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
(Gitignore patterns are a superset of glob patterns, adding a couple of rules on top of glob.)
With that, I like to propose support for gitignore-like (or at least glob) patterns in Black's include and exclude entries in pyproject.toml.
To keep it backwards-compatible, it can so that then the values are string, the old behavior is preserved (at least for now), and if the value is a list, they are treated as gitignore-like patterns, similar to Cargo.
What do you think?
The text was updated successfully, but these errors were encountered:
When putting
include
/exclude
rules intopyproject.toml
file...It's mentally easier to think about each pattern separately and not as a whole regex,
Glob/Gitignore-like patterns are easier to read and write, and
Using gitignore-like patterns allows easier comparison with the ignore file of the SCM.
Famously,
hg
started with regex patterns for its path patterns, but later enabled glob/gitignore-like patterns. http://hgbook.red-bean.com/read/file-names-and-pattern-matching.htmlCargo already accepts a list of glob/gitignore patterns. https://doc.rust-lang.org/stable/cargo/reference/manifest.html#the-exclude-and-include-fields-optional (We're in the middle of transition from glob patterns to gitignore-like ones. More here: rust-lang/cargo#4268)
(Gitignore patterns are a superset of glob patterns, adding a couple of rules on top of glob.)
With that, I like to propose support for gitignore-like (or at least glob) patterns in Black's
include
andexclude
entries inpyproject.toml
.To keep it backwards-compatible, it can so that then the values are string, the old behavior is preserved (at least for now), and if the value is a list, they are treated as gitignore-like patterns, similar to Cargo.
What do you think?
The text was updated successfully, but these errors were encountered: