Zac-HD/shed

[feature request] some way of passing through options/config to bundled tools

Closed this issue · 2 comments

For not the first time, I'd like to modify the behaviour of one of the bundled tools - which currently is entirely impossible. There's no way to pass through flags, and configuration files are ignored when loaded through shed.

One approach would be a config option for shed for parameters to pass through per tool, so e.g.
autoflake-flags = ["--remove-duplicate-keys", "--ignore-pass-statements"]
of course a bunch of flags will be irrelevant when run through shed, so one could also have a white-/blacklist.

and/or the ability to toggle whether a bundled tool should run it's normal config loading.

The current way of doing this is by running all the bundled tools on their own, but if you do that you lose shed's own codemods. So another approach would be to add a flag for "only run sheds custom refactors, don't bundle any tools", or have them split out into it's own package that's then treated as just another bundled tool.

This is explicitly out of scope for shed.

  • IMO a large part of the value is precisely because it's not configurable
  • Adding more options = more code = harder to maintain long-term (and it's already a side-side-project)
  • You can run bundled tools and - explicitly without any support or stability - import the codemods from shed internals.

(Sorry! I think your use-case is pretty unusual though)

npnp, I'll move flake8-trio to using the bundled tools then :)