Skip to content
Snippets Groups Projects
Commit a1910399 authored by Renaud Boyer's avatar Renaud Boyer
Browse files

template: Centralize python config files

parent 24d7cd5b
No related branches found
Tags v0.3.0
1 merge request!43template: Centralize python config files
Pipeline #11993 passed
......@@ -20,7 +20,7 @@ repos:
rev: 7.1.1
hooks:
- id: flake8
additional_dependencies: [flake8-bugbear==24.4.26]
additional_dependencies: [flake8-bugbear==24.4.26, flake8-pyproject]
- repo: https://github.com/codespell-project/codespell
rev: v2.3.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-pkg_resources.*]
ignore_missing_imports = True
# [mypy-add_your_lib_here.*]
# ignore_missing_imports = True
......@@ -57,3 +57,35 @@ ensure_newline_before_comments = true
line_length = 88
force_sort_within_sections = true
known_first_party = ['swh']
[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
[pytest]
norecursedirs = build docs .*
asyncio_mode = strict
consider_namespace_packages = true
[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
......@@ -22,12 +22,13 @@ python_minimal_version:
help: What is the minimal version of Python this supports?
default: "3.11"
choices:
- 3.7
- 3.8
- 3.9
- 3.10
- 3.11
- 3.12
- "3.7"
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
readme_format:
type: str
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment