Skip to content

Commit

Permalink
Fix check_paths build for pep8
Browse files Browse the repository at this point in the history
Signed-off-by: Carlos Coelho <carlospecter@gmail.com>
  • Loading branch information
chocoelho committed Nov 23, 2018
1 parent 4cc89a3 commit bc5663d
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions prospector/tools/pep8/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,9 @@ def configure(self, prospector_config, found_files):
if len(package) == 1:
check_paths.add(package_path)
continue
for i in range(1, len(package)):
if os.path.join(*package[:-i]) in check_paths:
break
else:
check_paths.add(package_path)
if os.path.join(*package) in check_paths:
continue
check_paths.add(package_path)

for filepath in found_files.iter_module_paths(abspath=False):
package = os.path.dirname(filepath).split(os.path.sep)
Expand Down

0 comments on commit bc5663d

Please sign in to comment.