diff options
| author | Anthony Sottile <asottile@umich.edu> | 2020-05-07 19:38:30 +0000 |
|---|---|---|
| committer | Anthony Sottile <asottile@umich.edu> | 2020-05-07 19:38:30 +0000 |
| commit | 03c7dd3a8d3624188a2f18e6e630f44b453847d8 (patch) | |
| tree | a1a6447fb160bb122be6a70289f6a364bdc588ba /src | |
| parent | 6c4b5c85c692a8d1d485614029f824f829489bca (diff) | |
| parent | 9e67511c691d460ee46296710e40d1fbe7af0837 (diff) | |
| download | flake8-03c7dd3a8d3624188a2f18e6e630f44b453847d8.tar.gz | |
Merge branch 'exclude_dotfiles' into 'master'
Fix using --exclude=.* to not match `.` and `..`
Closes #632
See merge request pycqa/flake8!424
Diffstat (limited to 'src')
| -rw-r--r-- | src/flake8/utils.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/flake8/utils.py b/src/flake8/utils.py index 29df9bc..e0c221a 100644 --- a/src/flake8/utils.py +++ b/src/flake8/utils.py @@ -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 |
