From d49c159887b90c646e39bb10e312d1a31ec767ea Mon Sep 17 00:00:00 2001 From: Lily Wang Date: Wed, 1 Nov 2023 22:25:48 +1100 Subject: [PATCH] moved tools to pyproject --- {{cookiecutter.repo_name}}/pyproject.toml | 23 ++++++++++++++ {{cookiecutter.repo_name}}/setup.cfg | 37 +---------------------- 2 files changed, 24 insertions(+), 36 deletions(-) diff --git a/{{cookiecutter.repo_name}}/pyproject.toml b/{{cookiecutter.repo_name}}/pyproject.toml index 4cdf1d7f..c224ca96 100644 --- a/{{cookiecutter.repo_name}}/pyproject.toml +++ b/{{cookiecutter.repo_name}}/pyproject.toml @@ -67,3 +67,26 @@ match = ["*"] distance = "{base_version}+{distance}.{vcs}{rev}" dirty = "{base_version}+{distance}.{vcs}{rev}.dirty" distance-dirty = "{base_version}+{distance}.{vcs}{rev}.dirty" + +[tool.coverage.run] +omit = [ + # Omit the tests + "*/tests/*", +] + +[tool.coverage.report] +exclude_also = [ + "if TYPE_CHECKING:", +] + +[tool.isort] +multi_line_output = 3 +include_trailing_comma = true +force_grid_wrap = 0 +use_parentheses = true +line_length = 80 + +[tool.yapf] +COLUMN_LIMIT = 80 +INDENT_WIDTH = 4 +USE_TABS = false diff --git a/{{cookiecutter.repo_name}}/setup.cfg b/{{cookiecutter.repo_name}}/setup.cfg index df14af4b..3dab725a 100644 --- a/{{cookiecutter.repo_name}}/setup.cfg +++ b/{{cookiecutter.repo_name}}/setup.cfg @@ -1,41 +1,6 @@ # Helper file to handle all configs -[coverage:run] -# .coveragerc to control coverage.py and pytest-cov -omit = - # Omit the tests - */tests/* - -[coverage:report] -exclude_also = - if TYPE_CHECKING: - -[isort] -multi_line_output = 3 -include_trailing_comma = True -force_grid_wrap = 0 -use_parentheses = True -line_length = 80 - - -[yapf] -# YAPF, in .style.yapf files this shows up as "[style]" header -COLUMN_LIMIT = 80 -INDENT_WIDTH = 4 -USE_TABS = False - [flake8] # Flake8, PyFlakes, etc +# flake8 does not support pyproject.toml currently max-line-length = 80 - -[aliases] -test = pytest - -[tool:pytest] -testpaths = {{cookiecutter.repo_name}}/tests - -[build_sphinx] -all-files = 1 -source-dir = docs/ -build-dir = docs/_build -warning-is-error = 1