You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I run blacken docs src I get an error because it is a directory. I would say it'd be a nice addition if this could work by default. I checked the source code and this could easily be achieved doing something like this:
frompathlibimportPathdefmain(argv: Sequence[str] |None=None) ->None:
"""Main entry point for the program."""parser=argparse.ArgumentParser()
parser.add_argument("filenames", nargs="*")
args=parser.parse_args(argv)
forfilenameinargs.filenames:
retv=0forfileinPath(filename).rglob("*"):
...
If you agree, I would like to propose a PR.
The text was updated successfully, but these errors were encountered:
I'd rather avoid adding and maintaining undifferentiated features like recursion (the next request would be glob patterns, ...). It's not hard to compose shell globbing or git ls-files + xargs to apply to all the files you want. I've added some docs in #269 that cover this.
Description
When I run
blacken docs src
I get an error because it is a directory. I would say it'd be a nice addition if this could work by default. I checked the source code and this could easily be achieved doing something like this:If you agree, I would like to propose a PR.
The text was updated successfully, but these errors were encountered: