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
342 stars 23 forks source link

Please clarify the format of the positional file argument? #24

Closed salimfadhleyhtp closed 3 years ago

salimfadhleyhtp commented 3 years ago

The readme.md / help text only gives the following information about the file argument:

positional arguments:
  file         File(s) to format, instead of autodetection

It's not clear what this file format is. Are globs allowed, can we do ** subdirectory matching? Could somebody expand the documentation to explain what kinds of values are acceptable?

Zac-HD commented 3 years ago

Your shell might handle globbing or ** subdirectory matching for you; but in shed I decided to only handle exact (relative or absolute) filenames - I already have one path which uses git to work out which files to format and directories to ignore, and that's both too important to leave out and too painful to build or maintain for a side project.

salimfadhleyhtp commented 3 years ago

@Zac-HD when I use black I normally do something like:

black ./src

Which by default processes every file in the "src" directory. If I try the same in shed I get this:

>shed --py39-plus --refactor ./src
skipping './src' due to [Errno 13] Permission denied: './src'

Is there a correct way to "process everything in " with Shed?

Zac-HD commented 3 years ago

You can either: