diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2012-03-29 17:42:45 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2012-03-29 17:42:45 -0400 |
commit | f99806b7b414cc5aea3e8b0a016f2dad68e6539d (patch) | |
tree | da3c6b88d012af34586630bfd24929823f7e7f95 /coverage/files.py | |
parent | 3a6ee9f2738c0ea08724551f2e8b8b1b366e42f8 (diff) | |
parent | ac8cf1852de2837234dab8cc823127e70c48e55e (diff) | |
download | python-coveragepy-f99806b7b414cc5aea3e8b0a016f2dad68e6539d.tar.gz |
Automated merge with ssh://bitbucket.org/ned/coveragepy
Diffstat (limited to 'coverage/files.py')
-rw-r--r-- | coverage/files.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/coverage/files.py b/coverage/files.py index 81ec196..e6dc4aa 100644 --- a/coverage/files.py +++ b/coverage/files.py @@ -215,5 +215,8 @@ def find_python_files(dirname): del dirnames[:] continue for filename in filenames: - if fnmatch.fnmatch(filename, "*.py"): + # We're only interested in files that look like reasonable Python + # files: Must end with .py, and must not have certain funny + # characters that probably mean they are editor junk. + if re.match(r"^[^.#~!$@%^&*()+=,]+\.py$", filename): yield os.path.join(dirpath, filename) |