Skip to content

Commit

Permalink
fix flake8 config (#300)
Browse files Browse the repository at this point in the history
  • Loading branch information
cocolato authored Jan 13, 2025
1 parent 6dfa6d0 commit b83fbae
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Source = "https://github.com/Thriftpy/thriftpy2"

[project.optional-dependencies]
dev = [
"flake8>=2.5",
"flake8>=4.0",
"sphinx-rtd-theme>=0.1.9",
"sphinx>=1.3",
"pytest-reraise",
Expand Down
15 changes: 13 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ universal = 1

[flake8]
filename = *.py, *.pyx
max-line-length = 80
max-line-length = 100
exclude =
setup.py,
.git,
Expand All @@ -13,6 +13,8 @@ exclude =
dist,
.tox,
venv*
.venv
tests
ignore =
# Ambiguous variable names
E741
Expand All @@ -26,4 +28,13 @@ ignore =
# E251: Unexpected spaces around keyword / parameter equals (types in function definitions)
# E402: module level import not at top of file
# E999: Internal AST compilation error (flake8 specific)
per-file-ignores = *.pyx: E211,E225,E226,E227,E251,E402,E999
# Apache JSON requires special flags
# E226: missing whitespace around arithmetic operator
# E501: line too long
# Cybin requires special flags
# F401: module imported but unused
# F403: 'from module import *' used; unable to detect undefined names
per-file-ignores =
*.pyx: E211,E225,E226,E227,E251,E402,E999
apache_json.py: E226,E501
*/cybin/__init__.py: F401,F403
5 changes: 1 addition & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ commands =
py.test

deps =
attrs==20.3.0; python_version == '3.4'
typing; python_version == '3.4'
pytest>=6.1.1,<8.2.0
pytest-reraise
coverage
Expand All @@ -23,8 +21,7 @@ deps =

[testenv:flake8]
deps =
flake8
flake8-per-file-ignores
flake8>=4.0
commands = flake8 .
changedir = .

Expand Down

0 comments on commit b83fbae

Please sign in to comment.