diff options
| author | Ian Cordasco <graffatcolmingov@gmail.com> | 2017-01-22 15:00:48 -0600 |
|---|---|---|
| committer | Ian Cordasco <graffatcolmingov@gmail.com> | 2017-01-22 15:00:48 -0600 |
| commit | 9f8dfd924a03aeeea19ba270e75e56b1bbebaff1 (patch) | |
| tree | f7838b6d868b1d80d7d432961d69f3d9426c1164 /src | |
| parent | c1f9dc724197a30a4c3d78883138f2b5b82a874e (diff) | |
| download | flake8-9f8dfd924a03aeeea19ba270e75e56b1bbebaff1.tar.gz | |
Return similarly named, non-submodule modules
In our setuptools integration command, we were attempting to avoid
checking each submodule in the packages list. This was done without
recognizing that two modules may start with the same prefix, e.g.,
- foo
- foo_bar
- foo_biz
In this case, we only ever checked ``foo``. By appending a '.' to the
end of each package name, we avoid this since we only care about
deduplicating submodules, e.g.,
- foo
- foo.sub
- foo.sub.sub
Closes #295
Diffstat (limited to 'src')
| -rw-r--r-- | src/flake8/main/setuptools_command.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/flake8/main/setuptools_command.py b/src/flake8/main/setuptools_command.py index ba5a260..a5d23a5 100644 --- a/src/flake8/main/setuptools_command.py +++ b/src/flake8/main/setuptools_command.py @@ -66,7 +66,7 @@ class Flake8(setuptools.Command): if package_directory.startswith(seen_package_directories): continue - seen_package_directories += (package_directory,) + seen_package_directories += (package_directory + '.',) yield package_directory def module_files(self): |
