Zac-HD / shed

`shed` canonicalises Python code. Shed your legacy, stop bikeshedding, and move on. Black++
https://pypi.org/project/shed/
GNU Affero General Public License v3.0
343 stars 23 forks source link

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

Closed jakkdl closed 1 year ago

jakkdl commented 1 year ago

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.

Zac-HD commented 1 year ago

This is explicitly out of scope for shed.

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

jakkdl commented 1 year ago

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