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

shed doesn't reformat .pyi files #60

Closed jakkdl closed 1 year ago

jakkdl commented 1 year ago

autoflake.is_python_file doesn't care about .pyi as a file ending, but I don't see why that's the case. Running Black or isort manually they both reformat .pyi, but shed uses autoflake's check and totally ignores them. I'm not sure if autoflake should fix it upstream, and/or if shed should reimplement is_python_file itself (or take it from isort/black/etc if they have one).

auscompgeek commented 1 year ago

It seems odd that autoflake ignores .pyi files. Surely pyflakes and autoflake will run fine on type stubs.

Zac-HD commented 1 year ago

Black also has a separate .pyi formatting mode, but I think the other wrapped tools are mostly just fine to operate on .pyi stubs too. Supporting this would be a new feature:

Zac-HD commented 1 year ago

Closed by #61 🎉