Commit Graph

28 Commits

Author SHA1 Message Date
Sebastian Rittau a913af9523 flake8: Enable F811 (#4158) 2020-06-02 14:08:54 -07:00
Sebastian Rittau 92f52a2615 flake8 updates and cleanups (#3940)
* flake8 updates and cleanups

* Update to flake8 3.7.9.
* Update to flake8-bugbear 20.1.4.
* Only ignore errors in stub files.
* Remove obsolete error counts.
* Sort error codes alphabetically.
* Don't ignore the following errors (unneeded):
    * E704 Multiple statements on one line (def)
    * W504 Line break occurred after a binary operator
    * B303 __metaclass__ used

* Remove obsolete comment

* Ignore F822 undefined name in __all__
2020-04-23 19:38:47 -07:00
Sebastian Rittau d82d3396e7 Minor flake8 improvements (#3324)
* Update flake8-bugbear
* Remove unnecessary comment
* Add a comment about an upcoming fix
2019-10-08 17:42:36 +02:00
Sebastian Rittau 006a79220f Flake8 fixes (#2549)
* Fix over-indented continuation lines

* Fix under-indented continuation lines

* Fix whitespace around default operator problems

* Limit line lengths

* Fix inconsistent files
2018-10-24 07:20:53 -07:00
Sebastian Rittau 680d69bd81 Update to flake8 3.6.0 (#2547)
* Update to flake8 3.6.0

* Configure line length and move to 'nice to have'

* Also update flake8-bugbear and pin flake8-pyi
2018-10-24 05:53:33 -07:00
Grzegorz Śliwiński 94485f9e4f skip .git files from linting with flake8 (#2506) 2018-10-05 08:29:21 -07:00
Łukasz Langa 6a1d25b73e Document why E741 is ignored 2018-03-28 20:25:50 -07:00
Jelle Zijlstra 5201ccdfff add E741 to ignored flake8 codes (#1999)
This was introduced in a recent version (so it doesn't affect us right now but will if we upgrade the flake8 version used in tests). It gives errors like:
```
/home/travis/build/ambv/flake8-pyi/.tox/typeshed/tmp/typeshed/stdlib/3/re.pyi:21:9: E741 ambiguous variable name 'I'
/home/travis/build/ambv/flake8-pyi/.tox/typeshed/tmp/typeshed/stdlib/3/re.pyi:39:5: E741 ambiguous variable name 'I'
/home/travis/build/ambv/flake8-pyi/.tox/typeshed/tmp/typeshed/stdlib/3/re.pyi:58:5: E741 ambiguous variable name 'I'
/home/travis/build/ambv/flake8-pyi/.tox/typeshed/tmp/typeshed/third_party/2/OpenSSL/crypto.pyi:43:5: E741 ambiguous variable name 'O'
```
These aren't useful for typeshed, because regardless of whether it's good style, these libraries really do contain variables named `I` and `O`.
2018-03-28 20:24:24 -07:00
Svyatoslav Ilinskiy a249b40a6d Make flake8 not complain about star imports (#1519)
This commit disables following flake8 errors:
* F403: `‘from module import *’ used; unable to detect undefined names`
* F405: `name may be undefined, or defined from star imports: module`

We don't need to worry about undefined names since running mypy_test.py
should detect such undefined names.
2017-08-03 14:26:31 -07:00
Emily Morehouse 85d017d1e8 Documentation updates for testing information (#1293)
- Removes references to 'runtests.sh', as it has been removed
- Adds links from the contributing file to the readme - testing section
- Updates flake8 stats
2017-05-22 16:10:26 -07:00
Guido van Rossum 761ee6afb3 Update configs and instructions for running tests manually. (#1137)
- Switch requirements-tests-py3.txt to use mypy GitHub master.
- Exclude .venv{2,3} (suggested in README.md) in .flake8 and .gitignore.
- Update instructions in README.md to be working.
- Remove runtests.sh script and mentions of it -- I can't get it to work
  and the three steps are easily run by hand.
2017-04-08 19:06:54 -07:00
Lukasz Langa 25a46f42be Switch to Python 3.6 for flake8 runs, re-enable E999 checks 2016-12-22 16:02:46 -08:00
Lukasz Langa 4466a225a6 Upgrade to flake8-pyi 16.12.1
Fixes #786.
2016-12-21 17:30:57 -08:00
Lukasz Langa 092b15e3e9 Mark 92 F821 to go. 2016-12-21 01:31:12 -08:00
Lukasz Langa 8c5c788a4d Enable flake8-pyi plugin to automatically include *.pyi files
This simplifies running flake8 tests and reduces the amount of F821 errors
reported (flake8-pyi enables support for forward references in *.pyi files).
The error code is left disabled until I clean up the remaining issues.
2016-12-21 00:56:01 -08:00
Lukasz Langa 82b2d8e3bc Fixing flake8 F403, F405 errors 2016-12-20 02:28:12 -08:00
Lukasz Langa 99a57e5cbe Fixing flake8 E251 errors 2016-12-20 01:54:34 -08:00
Lukasz Langa 68a49c2c2e Fixing flake8 E111, E114, E116, E203, E225, E262 errors 2016-12-20 01:39:18 -08:00
Lukasz Langa 6e2709906b Fixing flake8 B errors 2016-12-20 01:17:38 -08:00
Lukasz Langa ad9038dcd7 Fixing flake8 E303 errors 2016-12-20 01:08:00 -08:00
Lukasz Langa d70bb0c00f Fixing flake8 E202, E203, E225 errors 2016-12-20 01:02:59 -08:00
Lukasz Langa 6eb97964fd Fixing flake8 E401, E402 errors 2016-12-20 00:47:51 -08:00
Lukasz Langa 147772950f Fixing flake8 E265 errors 2016-12-20 00:16:44 -08:00
Lukasz Langa 5b6a9937b2 Fixing flake8 E266 errors 2016-12-20 00:06:36 -08:00
Lukasz Langa 6b5c6626d6 Fixing flake8 E121, E122, E123, E124, E125, E126 errors 2016-12-19 23:53:19 -08:00
Lukasz Langa fe0e3744cc Fixing flake8 E261 errors 2016-12-19 22:09:35 -08:00
Lukasz Langa b84f20a011 Fixing flake8 W errors 2016-12-19 21:52:56 -08:00
Lukasz Langa d2c0f83a72 Introduce flake8 configuration.
This is currently disabled due to the high number of errors that need fixing.
I'll be committing fixes for them and updating the numbers in .flake8 until we
can enable linting for all files by default.
2016-12-19 21:27:41 -08:00