Opened 5 months ago

Last modified 5 months ago

#7194 reviewing defect

tox is failing for buildtools, reporting flake8 errors — at Version 2

Reported by: kzar Assignee:
Priority: Unknown Milestone:
Module: Automation Keywords:
Cc: tlucas, sebastian Blocked By:
Blocking: Platform: Unknown / Cross platform
Ready: no Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

https://codereview.adblockplus.org/29975555/

Description (last modified by kzar)

Environment

How to reproduce

  1. Clone the buildtools repository, run tox.

Observed behaviour

While the tests all seem to pass, the following is output at the end:

py27 runtests: commands[2] | flake8
./releaseAutomation.py:146:17: W504 line break after binary operator
./releaseAutomation.py:151:17: W504 line break after binary operator
./ensure_dependencies.py:370:13: W504 line break after binary operator
./jshydra/abp_rewrite.py:29:33: C812 missing trailing comma
./jshydra/abp_rewrite.py:31:20: C812 missing trailing comma
./jshydra/abp_rewrite.py:47:39: C812 missing trailing comma
./jshydra/abp_rewrite.py:73:5: E722 do not use bare 'except'
./jshydra/autotest.py:58:1: E305 expected 2 blank lines after class or function definition, found 1
ERROR: InvocationError for command '/path/to/adblockpluschrome/buildtools/.tox/py27/bin/flake8' (exited with code 1)

Expected behaviour

Those error messages are not displayed.

Notes

  • Looking at it, jshydra is only there as it used to be a dependency of buildtools, and is also therefore being ignored by Git. Nevertheless, I figure we should still tell flake8 to skip checking it.
  • It seems that while newer versions of flake8 enforce the W504 line break after binary operator, older versions actually enforce the opposite W503 line break before binary operator rule! We've configured tox to use both a recent and old version of flake8, so we'll have to ignore at least one of these rules.

Change History (2)

comment:1 Changed 5 months ago by kzar

  • Description modified (diff)

comment:2 Changed 5 months ago by kzar

  • Description modified (diff)
Note: See TracTickets for help on using tickets.