From ec1b54b9d9f5d375350a2009d69120ed434249ef Mon Sep 17 00:00:00 2001 From: cocolato Date: Thu, 9 Jan 2025 22:12:58 +0800 Subject: [PATCH] fix flake8 config --- pyproject.toml | 2 +- setup.cfg | 9 +++++++-- tox.ini | 5 +---- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index cbf07d3..4291872 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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", diff --git a/setup.cfg b/setup.cfg index d8f9ee1..adc0cc8 100644 --- a/setup.cfg +++ b/setup.cfg @@ -3,7 +3,7 @@ universal = 1 [flake8] filename = *.py, *.pyx -max-line-length = 80 +max-line-length = 100 exclude = setup.py, .git, @@ -13,6 +13,8 @@ exclude = dist, .tox, venv* + .venv + tests ignore = # Ambiguous variable names E741 @@ -26,4 +28,7 @@ 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 +per-file-ignores = + *.pyx: E211,E225,E226,E227,E251,E402,E999 + apache_json.py: E226,E501 + */cybin/__init__.py: F401,F403 \ No newline at end of file diff --git a/tox.ini b/tox.ini index fcddbd6..c80b6c4 100644 --- a/tox.ini +++ b/tox.ini @@ -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 @@ -23,8 +21,7 @@ deps = [testenv:flake8] deps = - flake8 - flake8-per-file-ignores + flake8>=4.0 commands = flake8 . changedir = .