Skip to content
This repository has been archived by the owner on Nov 17, 2020. It is now read-only.

Commit

Permalink
Fix pep8.py and its invocation.
Browse files Browse the repository at this point in the history
pep8.py:input_file() normally returns the number of errors found in a
given file, but it returns an empty dict if the file is excluded.  Change
it to return 0 instead.

config.py is auto-generated with a prefix that may be longer than
80 characters.  Exclude config.py in the pep8.py check.  This fixes
4042.
  • Loading branch information
chrismrivera authored and boondocksaints-debug committed May 28, 2009
1 parent aa94335 commit f941537
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile.am
Expand Up @@ -53,6 +53,6 @@ upload-release: $(distdir).tar.gz

check-local:
@echo " PEP-8 INQUISITION"
@find $(top_srcdir)/giscanner -name \*.py | sort | uniq | xargs $(PYTHON) $(top_srcdir)/misc/pep8.py --repeat
@find $(top_srcdir)/giscanner -name \*.py | sort | uniq | xargs $(PYTHON) $(top_srcdir)/misc/pep8.py --repeat --exclude=config.py
@echo " CHECK Pyflakes"
@find $(top_srcdir)/giscanner -name \*.py | sort | uniq | xargs $(PYTHON) $(top_srcdir)/misc/pyflakes.py
2 changes: 1 addition & 1 deletion misc/pep8.py
Expand Up @@ -647,7 +647,7 @@ def input_file(filename):
Run all checks on a Python source file.
"""
if excluded(filename) or not filename_match(filename):
return {}
return 0
if options.verbose:
message('checking ' + filename)
options.counters['files'] = options.counters.get('files', 0) + 1
Expand Down

0 comments on commit f941537

Please sign in to comment.