-
Notifications
You must be signed in to change notification settings - Fork 2.7k
--include= and --exclude= #270
Copy link
Copy link
Closed
Labels
T: enhancementNew feature or requestNew feature or requestT: styleWhat do we want Blackened code to look like?What do we want Blackened code to look like?
Description
I always steered people towards find | grep -E | grep -Ev | xargs black to do custom file matching. But that doesn't work on Windows. We need support for --include= and --exclude= within Black.
They hold regular expressions. The former is "what gets included on recursive searches", the latter "what gets dropped on recursive searches". You can pass multiple --include and multiple --exclude. Checks for --exclude are done first, checks for --include later.
--include= would have a default that is now stores in PYTHON_EXTENSIONS (".pyi?$" in regex form)
--exclude= would have a default that is now stored in BLACKLISTED_DIRECTORIES
This functionality is required by pypa/pip#5425.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
T: enhancementNew feature or requestNew feature or requestT: styleWhat do we want Blackened code to look like?What do we want Blackened code to look like?