diff --git a/.copier-answers.yml b/.copier-answers.yml index 97226e4dc2cf8fe21da00489bbba7fb0bd180e94..a6e23626f1bbefed26828f30c016c25e67815afc 100644 --- a/.copier-answers.yml +++ b/.copier-answers.yml @@ -1,5 +1,5 @@ # Changes here will be overwritten by Copier -_commit: v0.2.3 +_commit: v0.3.3 _src_path: https://gitlab.softwareheritage.org/swh/devel/swh-py-template.git description: Software Heritage Documentation distribution_name: swh-docs diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 96512ea6cd1c0b6a1f8ee92964702310b7f548fe..aa66426e227d390806a91436fcaf2d540be69c0d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,18 +1,18 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.6.0 + rev: v5.0.0 hooks: - id: trailing-whitespace - id: check-json - id: check-yaml - repo: https://github.com/python/black - rev: 24.8.0 + rev: 25.1.0 hooks: - id: black - repo: https://github.com/PyCQA/isort - rev: 5.13.2 + rev: 6.0.0 hooks: - id: isort @@ -20,16 +20,16 @@ repos: rev: 7.1.1 hooks: - id: flake8 - additional_dependencies: [flake8-bugbear==24.4.26] + additional_dependencies: [flake8-bugbear==24.12.12, flake8-pyproject] - repo: https://github.com/codespell-project/codespell - rev: v2.3.0 + rev: v2.4.1 hooks: - id: codespell name: Check source code spelling additional_dependencies: - tomli - stages: [commit] + stages: [pre-commit] - id: codespell name: Check commit message spelling additional_dependencies: diff --git a/mypy.ini b/mypy.ini deleted file mode 100644 index 7823a866489c1a6a8fe7f1d3e0022766d3d071c2..0000000000000000000000000000000000000000 --- a/mypy.ini +++ /dev/null @@ -1,14 +0,0 @@ -[mypy] -namespace_packages = True -warn_unused_ignores = True -explicit_package_bases = True -# ^ Needed for mypy to detect py.typed from swh packages installed -# in editable mode - -# 3rd party libraries without stubs (yet) - -[mypy-sphinx.*] -ignore_missing_imports = True - -# [mypy-add_your_lib_here.*] -# ignore_missing_imports = True diff --git a/pyproject.toml b/pyproject.toml index 8203425e496193c35a5eb08c3f297eb3e209645f..dd9d4e21cdb57cb6e3c2788298ce266fba1b5a09 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,3 +55,35 @@ known_first_party = ['swh'] [tool.codespell] ignore-words-list = "aks,crate" + +[tool.mypy] +namespace_packages = true +warn_unused_ignores = true +explicit_package_bases = true +# ^ Needed for mypy to detect py.typed from swh packages installed +# in editable mode + +plugins = [] + +# 3rd party libraries without stubs (yet) +# [[tool.mypy.overrides]] +# module = [ +# "package1.*", +# "package2.*", +# ] +# ignore_missing_imports = true + +[tool.flake8] +select = ["C", "E", "F", "W", "B950"] +ignore = [ + "E203", # whitespaces before ':' <https://github.com/psf/black/issues/315> + "E231", # missing whitespace after ',' + "E501", # line too long, use B950 warning from flake8-bugbear instead + "W503" # line break before binary operator <https://github.com/psf/black/issues/52> +] +max-line-length = 88 + +[tool.pytest.ini_options] +norecursedirs = "build docs .*" +asyncio_mode = "strict" +consider_namespace_packages = true diff --git a/pytest.ini b/pytest.ini deleted file mode 100644 index fe398a0babf5a774f332240c7ce22d38f7330ba1..0000000000000000000000000000000000000000 --- a/pytest.ini +++ /dev/null @@ -1,4 +0,0 @@ -[pytest] -norecursedirs = build docs .* -asyncio_mode = strict -consider_namespace_packages = true diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index adf9af3e48c7da13135e5dfb6505a1909bc26066..0000000000000000000000000000000000000000 --- a/setup.cfg +++ /dev/null @@ -1,8 +0,0 @@ -[flake8] -# E203: whitespaces before ':' <https://github.com/psf/black/issues/315> -# E231: missing whitespace after ',' -# E501: line too long, use B950 warning from flake8-bugbear instead -# W503: line break before binary operator <https://github.com/psf/black/issues/52> -select = C,E,F,W,B950 -ignore = E203,E231,E501,E704,W503 -max-line-length = 88 diff --git a/tox.ini b/tox.ini index 71d171d73149fd4ea31f4dc65673de0738913412..7ea5b49e24c4d5d6a2224ad04dcc45bc3d3000a0 100644 --- a/tox.ini +++ b/tox.ini @@ -40,7 +40,7 @@ commands = [testenv:black] skip_install = true deps = - black==24.8.0 + black==25.1.0 commands = {envpython} -m black --check swh @@ -48,7 +48,9 @@ commands = skip_install = true deps = flake8==7.1.1 - flake8-bugbear==24.4.26 + flake8-bugbear==24.12.12 + flake8-pyproject==1.2.3 pycodestyle==2.12.1 + commands = {envpython} -m flake8