mirror of
https://github.com/kk7ds/chirp.git
synced 2024-09-21 10:37:15 +00:00
Improve cpep8 scripts (#2355)
This patch adds prints to cpep8.py's scanning function. It's useful to know what files the script is scanning during an update, as the in-tree virtualenv (or other files) may be included by accident. This patch also fixes cpep8.sh to use the correct path to cpep8.py, allowing it to be run from anywhere in the source tree.
This commit is contained in:
parent
ccd77bfa9f
commit
4708fc8e52
@ -90,12 +90,14 @@ def get_exceptions(f):
|
||||
return ignore
|
||||
|
||||
if args.update:
|
||||
print "Starting update of %d files" % len(manifest)
|
||||
bad = []
|
||||
for f in manifest:
|
||||
checker = pep8.StyleGuide(quiet=True, ignore=get_exceptions(f))
|
||||
results = checker.check_files([f])
|
||||
if results.total_errors:
|
||||
bad.append(f)
|
||||
print "%s: %s" % (results.total_errors and "FAIL" or "PASS", f)
|
||||
|
||||
with file(blacklist_filename, "w") as fh:
|
||||
print >>fh, """\
|
||||
|
@ -17,5 +17,5 @@ fi
|
||||
|
||||
source ${VENV}/bin/activate
|
||||
pip install pep8==${PEP8_VERSION} >${VENV}/pep8.log 2>&1
|
||||
./tools/cpep8.py "$@"
|
||||
${TOOLS_DIR}/cpep8.py "$@"
|
||||
deactivate
|
||||
|
Loading…
Reference in New Issue
Block a user