parent
959848c176
commit
af7105f9ab
6
black.py
6
black.py
@ -423,7 +423,7 @@ def main(
|
|||||||
write_back = WriteBack.from_configuration(check=check, diff=diff)
|
write_back = WriteBack.from_configuration(check=check, diff=diff)
|
||||||
if target_version:
|
if target_version:
|
||||||
if py36:
|
if py36:
|
||||||
err(f"Cannot use both --target-version and --py36")
|
err("Cannot use both --target-version and --py36")
|
||||||
ctx.exit(2)
|
ctx.exit(2)
|
||||||
else:
|
else:
|
||||||
versions = set(target_version)
|
versions = set(target_version)
|
||||||
@ -3567,7 +3567,7 @@ def gen_python_files_in_dir(
|
|||||||
for child in path.iterdir():
|
for child in path.iterdir():
|
||||||
# First ignore files matching .gitignore
|
# First ignore files matching .gitignore
|
||||||
if gitignore.match_file(child.as_posix()):
|
if gitignore.match_file(child.as_posix()):
|
||||||
report.path_ignored(child, f"matches the .gitignore file content")
|
report.path_ignored(child, "matches the .gitignore file content")
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# Then ignore with `exclude` option.
|
# Then ignore with `exclude` option.
|
||||||
@ -3591,7 +3591,7 @@ def gen_python_files_in_dir(
|
|||||||
|
|
||||||
exclude_match = exclude.search(normalized_path)
|
exclude_match = exclude.search(normalized_path)
|
||||||
if exclude_match and exclude_match.group(0):
|
if exclude_match and exclude_match.group(0):
|
||||||
report.path_ignored(child, f"matches the --exclude regular expression")
|
report.path_ignored(child, "matches the --exclude regular expression")
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if child.is_dir():
|
if child.is_dir():
|
||||||
|
Loading…
Reference in New Issue
Block a user