Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
nit: simplify comments, leave explicit 'show_default'
  • Loading branch information
ambv committed May 7, 2021
commit 989a9153a653c4883aee82119c71e4a1684dad2d
4 changes: 2 additions & 2 deletions src/black/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,7 @@ def validate_regex(
" Exclusions are calculated first, inclusions later. [default:"
f" {DEFAULT_EXCLUDES}]"
),
show_default=False,
)
@click.option(
"--extend-exclude",
Expand Down Expand Up @@ -673,7 +674,6 @@ def get_sources(
sources: Set[Path] = set()
path_empty(src, "No Path provided. Nothing to do 😴", quiet, verbose, ctx)

# use default and gitignore exclusion rules if exclude option isn't specified
if exclude is None:
exclude = re_compile_maybe_verbose(DEFAULT_EXCLUDES)
gitignore = get_gitignore(root)
Expand Down Expand Up @@ -6241,7 +6241,7 @@ def gen_python_files(
if normalized_path is None:
continue

# Ignore files matching .gitignore only if 'exclude' is not passed
# First ignore files matching .gitignore, if passed
if gitignore is not None and gitignore.match_file(normalized_path):
report.path_ignored(child, "matches the .gitignore file content")
continue
Expand Down