diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4b46ea4a7..eb8e034f4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -8,10 +8,4 @@ repos: args: [--fix] # Run the formatter. - id: ruff-format - - - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v1.2.3 - hooks: - - id: flake8 - args: [--exclude src/exabgp/vendoring] - additional_dependencies: [flake8-bugbear] + \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 2a5151023..366bc9231 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -52,7 +52,6 @@ dev-dependencies = [ "pytest", "pytest-cov", "coveralls", - "flake8", "psutil", ] @@ -72,16 +71,6 @@ indent-style = "space" docstring-code-format = true -[tool.flake8] -max-line-length = 120 -show-source = true -max-complexity = 18 -statistics = true -exclude = '.git,.tox,__pycache__,build,dist,tests/*,src/exabgp/vendoring/*,' -select = 'B,C,E,F,W,T4,B9' -variable-rgx = "[a-z_][a-z0-9_]{0,30}$" -ignore = 'E222,E231,E241,E131,E203,E266,E501,W503,F403,F401,' - # E131 continuation line unaligned for hanging indent # E203 whitespace before ':' # E222 multiple spaces after operator @@ -94,40 +83,3 @@ ignore = 'E222,E231,E241,E131,E203,E266,E501,W503,F403,F401,' # F401 imported but unused # F403 # the last , is required otherwise the last error ignore is not applied - - -# pycodestyle (formerly called pep8) -# [tool.pycodestyle] -# max_line_length = 120 -# ignore = 'W191' - - -# [tool.black] -# line-length = 120 -# target-version = [ -# 'py36', -# 'py37', -# 'py38', -# 'py39', -# 'py310', -# 'py311', -# 'py312', -# 'py313', -# ] -# skip_string_normalization = '1' -# include = '\.pyi?$' -# exclude = ''' -# /( -# \.eggs -# | \.git -# | \.hg -# | \.mypy_cache -# | \.tox -# | \.venv -# | _build -# | buck-out -# | build -# | dist -# | tests/data -# )/ -# ''' diff --git a/uv.lock b/uv.lock index 1b5305783..d514ebc92 100644 --- a/uv.lock +++ b/uv.lock @@ -172,7 +172,7 @@ wheels = [ [package.optional-dependencies] toml = [ - { name = "tomli", marker = "(python_full_version <= '3.11' and sys_platform == 'darwin') or (python_full_version <= '3.11' and sys_platform == 'linux')" }, + { name = "tomli", marker = "(python_full_version <= '3.11' and sys_platform == 'darwin' and python_full_version >= '3.8.1' and python_full_version <= '3.13') or (python_full_version <= '3.11' and sys_platform == 'linux' and python_full_version >= '3.8.1' and python_full_version <= '3.13')" }, ] [[package]] @@ -203,7 +203,6 @@ source = { editable = "." } [package.dev-dependencies] dev = [ { name = "coveralls", marker = "sys_platform == 'darwin' or sys_platform == 'linux'" }, - { name = "flake8", marker = "sys_platform == 'darwin' or sys_platform == 'linux'" }, { name = "psutil", marker = "sys_platform == 'darwin' or sys_platform == 'linux'" }, { name = "pytest", marker = "sys_platform == 'darwin' or sys_platform == 'linux'" }, { name = "pytest-cov", marker = "sys_platform == 'darwin' or sys_platform == 'linux'" }, @@ -215,7 +214,6 @@ dev = [ [package.metadata.requires-dev] dev = [ { name = "coveralls" }, - { name = "flake8" }, { name = "psutil" }, { name = "pytest" }, { name = "pytest-cov" }, @@ -231,20 +229,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/02/cc/b7e31358aac6ed1ef2bb790a9746ac2c69bcb3c8588b41616914eb106eaf/exceptiongroup-1.2.2-py3-none-any.whl", hash = "sha256:3111b9d131c238bec2f8f516e123e14ba243563fb135d3fe885990585aa7795b", size = 16453 }, ] -[[package]] -name = "flake8" -version = "7.1.1" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "mccabe", marker = "sys_platform == 'darwin' or sys_platform == 'linux'" }, - { name = "pycodestyle", marker = "sys_platform == 'darwin' or sys_platform == 'linux'" }, - { name = "pyflakes", marker = "sys_platform == 'darwin' or sys_platform == 'linux'" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/37/72/e8d66150c4fcace3c0a450466aa3480506ba2cae7b61e100a2613afc3907/flake8-7.1.1.tar.gz", hash = "sha256:049d058491e228e03e67b390f311bbf88fce2dbaa8fa673e7aea87b7198b8d38", size = 48054 } -wheels = [ - { url = "https://files.pythonhosted.org/packages/d9/42/65004373ac4617464f35ed15931b30d764f53cdd30cc78d5aea349c8c050/flake8-7.1.1-py2.py3-none-any.whl", hash = "sha256:597477df7860daa5aa0fdd84bf5208a043ab96b8e96ab708770ae0364dd03213", size = 57731 }, -] - [[package]] name = "idna" version = "3.10" @@ -263,15 +247,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/ef/a6/62565a6e1cf69e10f5727360368e451d4b7f58beeac6173dc9db836a5b46/iniconfig-2.0.0-py3-none-any.whl", hash = "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374", size = 5892 }, ] -[[package]] -name = "mccabe" -version = "0.7.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/e7/ff/0ffefdcac38932a54d2b5eed4e0ba8a408f215002cd178ad1df0f2806ff8/mccabe-0.7.0.tar.gz", hash = "sha256:348e0240c33b60bbdf4e523192ef919f28cb2c3d7d5c7794f74009290f236325", size = 9658 } -wheels = [ - { url = "https://files.pythonhosted.org/packages/27/1a/1f68f9ba0c207934b35b86a8ca3aad8395a3d6dd7921c0686e23853ff5a9/mccabe-0.7.0-py2.py3-none-any.whl", hash = "sha256:6c2d30ab6be0e4a46919781807b4f0d834ebdd6c6e3dca0bda5a15f863427b6e", size = 7350 }, -] - [[package]] name = "packaging" version = "24.1" @@ -303,34 +278,16 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/27/c2/d034856ac47e3b3cdfa9720d0e113902e615f4190d5d1bdb8df4b2015fb2/psutil-6.1.0-cp36-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d905186d647b16755a800e7263d43df08b790d709d575105d419f8b6ef65423a", size = 288804 }, ] -[[package]] -name = "pycodestyle" -version = "2.12.1" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/43/aa/210b2c9aedd8c1cbeea31a50e42050ad56187754b34eb214c46709445801/pycodestyle-2.12.1.tar.gz", hash = "sha256:6838eae08bbce4f6accd5d5572075c63626a15ee3e6f842df996bf62f6d73521", size = 39232 } -wheels = [ - { url = "https://files.pythonhosted.org/packages/3a/d8/a211b3f85e99a0daa2ddec96c949cac6824bd305b040571b82a03dd62636/pycodestyle-2.12.1-py2.py3-none-any.whl", hash = "sha256:46f0fb92069a7c28ab7bb558f05bfc0110dac69a0cd23c61ea0040283a9d78b3", size = 31284 }, -] - -[[package]] -name = "pyflakes" -version = "3.2.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/57/f9/669d8c9c86613c9d568757c7f5824bd3197d7b1c6c27553bc5618a27cce2/pyflakes-3.2.0.tar.gz", hash = "sha256:1c61603ff154621fb2a9172037d84dca3500def8c8b630657d1701f026f8af3f", size = 63788 } -wheels = [ - { url = "https://files.pythonhosted.org/packages/d4/d7/f1b7db88d8e4417c5d47adad627a93547f44bdc9028372dbd2313f34a855/pyflakes-3.2.0-py2.py3-none-any.whl", hash = "sha256:84b5be138a2dfbb40689ca07e2152deb896a65c3a3e24c251c5c62489568074a", size = 62725 }, -] - [[package]] name = "pytest" version = "8.3.3" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "exceptiongroup", marker = "(python_full_version < '3.11' and sys_platform == 'darwin') or (python_full_version < '3.11' and sys_platform == 'linux')" }, + { name = "exceptiongroup", marker = "(python_full_version < '3.11' and sys_platform == 'darwin' and python_full_version >= '3.8.1' and python_full_version <= '3.13') or (python_full_version < '3.11' and sys_platform == 'linux' and python_full_version >= '3.8.1' and python_full_version <= '3.13')" }, { name = "iniconfig", marker = "sys_platform == 'darwin' or sys_platform == 'linux'" }, { name = "packaging", marker = "sys_platform == 'darwin' or sys_platform == 'linux'" }, { name = "pluggy", marker = "sys_platform == 'darwin' or sys_platform == 'linux'" }, - { name = "tomli", marker = "(python_full_version < '3.11' and sys_platform == 'darwin') or (python_full_version < '3.11' and sys_platform == 'linux')" }, + { name = "tomli", marker = "(python_full_version < '3.11' and sys_platform == 'darwin' and python_full_version >= '3.8.1' and python_full_version <= '3.13') or (python_full_version < '3.11' and sys_platform == 'linux' and python_full_version >= '3.8.1' and python_full_version <= '3.13')" }, ] sdist = { url = "https://files.pythonhosted.org/packages/8b/6c/62bbd536103af674e227c41a8f3dcd022d591f6eed5facb5a0f31ee33bbc/pytest-8.3.3.tar.gz", hash = "sha256:70b98107bd648308a7952b06e6ca9a50bc660be218d53c257cc1fc94fda10181", size = 1442487 } wheels = [