diff --git a/.coveragerc b/.coveragerc deleted file mode 100644 index ffa4fcc..0000000 --- a/.coveragerc +++ /dev/null @@ -1,12 +0,0 @@ -[run] -plugins = Cython.Coverage -omit = - tests - -[report] -exclude_lines = - pragma: no cover - except NotImplementedError - except ImportError - if TYPE_CHECKING: - @overload diff --git a/.flake8 b/.flake8 deleted file mode 100644 index 7ca09ef..0000000 --- a/.flake8 +++ /dev/null @@ -1,7 +0,0 @@ -[flake8] -profile = black -exclude = docs,.eggs,examples -max-line-length = 88 -docstring-convention = numpy -docstring_style = numpy -ignore = D100, D213, D401, D413, D107, W503 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 14f1ea9..2acb32a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -48,10 +48,10 @@ repos: rev: 4.0.1 hooks: - id: flake8 - args: [--min-python-version=3.7.0] additional_dependencies: - flake8-typing-imports - flake8-bugbear + - flake8-pyprojecttoml - repo: https://github.com/pre-commit/mirrors-mypy rev: v0.960 diff --git a/pyproject.toml b/pyproject.toml index 920aa2a..789e99e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -121,6 +121,7 @@ filterwarnings = [ "error", "ignore:The distutils package is deprecated::", "ignore:The distutils.sysconfig module is deprecated::", + "ignore:distutils Version classes are deprecated:" ] # https://mypy.readthedocs.io/en/stable/config_file.html @@ -146,8 +147,13 @@ exclude_lines = [ "if TYPE_CHECKING:", "@overload", "except ImportError", + "except NotImplementedError", ] +[tool.coverage.run] +plugins = ["Cython.Coverage"] +omit = ["tests"] + # https://github.com/cruft/cruft [tool.cruft] skip = ["tests"] @@ -195,3 +201,12 @@ branch = "main" changelog_sections="feature,fix,breaking,documentation,performance,chore,:boom:,:sparkles:,:children_crossing:,:lipstick:,:iphone:,:egg:,:chart_with_upwards_trend:,:ambulance:,:lock:,:bug:,:zap:,:goal_net:,:alien:,:wheelchair:,:speech_balloon:,:mag:,:apple:,:penguin:,:checkered_flag:,:robot:,:green_apple:,Other" # commit_parser=semantic_release.history.angular_parser build_command = "pip install build && python -m build" + +# https://flake8.pycqa.org/en/latest/user/options.html +# https://gitlab.com/durko/flake8-pyprojecttoml +[tool.flake8] +exclude = "docs,_version.py,.eggs,examples" +max-line-length = "88" +docstring-convention = "numpy" +ignore = "W503,D" +min-python-version = "3.7.0"