mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-05 12:36:54 +00:00
Merge branch 'exclude_dotfiles' into 'master'
Fix using --exclude=.* to not match `.` and `..` Closes #632 See merge request pycqa/flake8!424
This commit is contained in:
commit
03c7dd3a8d
2 changed files with 9 additions and 1 deletions
|
|
@ -448,7 +448,7 @@ def matches_filename(path, patterns, log_message, logger):
|
|||
if not patterns:
|
||||
return False
|
||||
basename = os.path.basename(path)
|
||||
if fnmatch(basename, patterns):
|
||||
if basename not in {".", ".."} and fnmatch(basename, patterns):
|
||||
logger.debug(log_message, {"path": basename, "whether": ""})
|
||||
return True
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue