From 53b98ada94c7b8c1ddc968e919a26b9901769da1 Mon Sep 17 00:00:00 2001 From: Victor Blomqvist Date: Sat, 7 Sep 2024 20:54:01 +0200 Subject: [PATCH] setup.py pyproject.toml fixes --- pyproject.toml | 42 +++++++++++++++++++++++++++++++++++++++++- setup.cfg | 40 ---------------------------------------- setup.py | 1 + 3 files changed, 42 insertions(+), 41 deletions(-) delete mode 100644 setup.cfg diff --git a/pyproject.toml b/pyproject.toml index b10ce200..2940b3b3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,43 @@ [build-system] requires = ["setuptools", "wheel", "cffi >= 1.15.0"] -build-backend = "setuptools.build_meta" \ No newline at end of file +build-backend = "setuptools.build_meta" + + +[tool.isort] +multi_line_output = 3 +include_trailing_comma = True +force_grid_wrap = 0 +use_parentheses = True +ensure_newline_before_comments = True +line_length = 88 + + +[tool.mypy] +disallow_untyped_defs = True +strict_equality = True +warn_unused_configs = True +disallow_any_generics = True +warn_redundant_casts = True +disallow_subclassing_any = True +disallow_untyped_calls = True +disallow_incomplete_defs = True +no_implicit_optional = True +no_implicit_reexport = True +check_untyped_defs = True +warn_unused_ignores = True + +# Because many values are returned directly from CFFI/Chipmunk (and are therefore Any) +warn_return_any = False + +# Because decorators are mostly from CFFI used for callbacks (and therefor untyped) +disallow_untyped_decorators = False + +exclude = [ + '^pymunk\examples\.*$', # exclude examples from type checking +] + + +[mypy-pymunk.util] +# This is not typed +disallow_untyped_defs = False +check_untyped_defs = False diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 190918ea..00000000 --- a/setup.cfg +++ /dev/null @@ -1,40 +0,0 @@ -[sdist] -formats = zip - -[isort] -multi_line_output = 3 -include_trailing_comma = True -force_grid_wrap = 0 -use_parentheses = True -ensure_newline_before_comments = True -line_length = 88 - -[mypy] -disallow_untyped_defs = True -strict_equality = True -warn_unused_configs = True -disallow_any_generics = True -warn_redundant_casts = True -disallow_subclassing_any = True -disallow_untyped_calls = True -disallow_incomplete_defs = True -no_implicit_optional = True -no_implicit_reexport = True -check_untyped_defs = True -warn_unused_ignores = True - -# Because many values are returned directly from CFFI/Chipmunk (and are therefore Any) -warn_return_any = False - -# Because decorators are mostly from CFFI used for callbacks (and therefor untyped) -disallow_untyped_decorators = False - -exclude = (?x)( - ^pymunk/examples/.*$ # exclude examples from type checking - ) - -[mypy-pymunk.util] -# This is not typed -disallow_untyped_defs = False -check_untyped_defs = False - diff --git a/setup.py b/setup.py index c41ab984..056f6809 100644 --- a/setup.py +++ b/setup.py @@ -24,6 +24,7 @@ packages = ["pymunk", "pymunk.tests"] exclude_package_data = {"pymunk.examples": ["*.*"]} + setup( name="pymunk", url="http://www.pymunk.org",