File tree Expand file tree Collapse file tree
tests/data/test_package_generation
{{cookiecutter.project_slug}}
src/{{cookiecutter.package_name}} Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,14 +23,14 @@ repos:
2323 rev : v0.24.4
2424 hooks :
2525 - id : toml-sort-fix
26- - repo : https://github.com/pre-commit/mirrors-mypy
27- rev : v1.20.2
26+ - repo : https://github.com/astral-sh/ty-pre-commit
27+ rev : v0.0.49
2828 hooks :
29- - id : mypy
29+ - id : ty
3030 args :
31- - --config-file=pyproject.toml
32- additional_dependencies :
33- - pytest
31+ - --group=typechecking
32+ - --isolated
33+ - --no-default-groups
3434 - repo : https://github.com/rbubley/mirrors-prettier
3535 rev : v3.8.3
3636 hooks :
Original file line number Diff line number Diff line change 1+ [dependency-groups ]
2+ typechecking = [
3+ " pytest" ,
4+ " pytest-venv" ,
5+ ]
6+
17[tool .pytest .ini_options ]
28addopts = [
39 " --color=yes" ,
Original file line number Diff line number Diff line change @@ -18,10 +18,14 @@ repos:
1818 rev : v0.24.4
1919 hooks :
2020 - id : toml-sort-fix
21- - repo : https://github.com/pre-commit/mirrors-mypy
22- rev : v1.20.2
21+ - repo : https://github.com/astral-sh/ty-pre-commit
22+ rev : v0.0.49
2323 hooks :
24- - id : mypy
24+ - id : ty
25+ args :
26+ - --group=typechecking
27+ - --isolated
28+ - --no-default-groups
2529 - repo : https://github.com/rbubley/mirrors-prettier
2630 rev : v3.8.3
2731 hooks :
Original file line number Diff line number Diff line change @@ -8,11 +8,11 @@ requires = [
88[dependency-groups ]
99dev = [
1010 " build" ,
11- " mypy" ,
1211 " pre-commit" ,
1312 " ruff" ,
1413 " tox" ,
1514 " twine" ,
15+ " ty" ,
1616]
1717docs = [
1818 " mkdocs-include-markdown-plugin" ,
@@ -25,6 +25,9 @@ test = [
2525 " pytest" ,
2626 " pytest-cov" ,
2727]
28+ typechecking = [
29+ " pytest" ,
30+ ]
2831
2932[project ]
3033authors = [
@@ -67,9 +70,6 @@ paths.source = [
6770 " .tox*/*/lib/python*/site-packages" ,
6871]
6972
70- [tool .mypy ]
71- explicit_package_bases = true
72-
7373[tool .pytest .ini_options ]
7474addopts = [
7575 " --color=yes" ,
@@ -148,3 +148,7 @@ gh.python."3.11" = ["py311"]
148148gh.python."3.12" = [" py312" ]
149149gh.python."3.13" = [" py313" ]
150150gh.python."3.14" = [" py314" ]
151+
152+ [tool .ty ]
153+ analysis.respect-type-ignore-comments = false
154+ terminal.error-on-warning = true
Original file line number Diff line number Diff line change 11"""cookiecutter_test package."""
22
3- from ._version import __version__ # noqa: F401
3+ from ._version import __version__ # noqa: F401 # ty: ignore[unresolved-import]
44
55
66def example_function (argument : str , keyword_argument : str = "default" ) -> str :
Original file line number Diff line number Diff line change @@ -18,10 +18,14 @@ repos:
1818 rev : v0.24.4
1919 hooks :
2020 - id : toml-sort-fix
21- - repo : https://github.com/pre-commit/mirrors-mypy
22- rev : v1.20.2
21+ - repo : https://github.com/astral-sh/ty-pre-commit
22+ rev : v0.0.49
2323 hooks :
24- - id : mypy
24+ - id : ty
25+ args :
26+ - --group=typechecking
27+ - --isolated
28+ - --no-default-groups
2529 - repo : https://github.com/rbubley/mirrors-prettier
2630 rev : v3.8.3
2731 hooks :
Original file line number Diff line number Diff line change @@ -8,11 +8,11 @@ requires = [
88[dependency-groups ]
99dev = [
1010 " build" ,
11- " mypy" ,
1211 " pre-commit" ,
1312 " ruff" ,
1413 " tox" ,
1514 " twine" ,
15+ " ty" ,
1616]
1717docs = [
1818 " mkdocs-include-markdown-plugin" ,
@@ -25,6 +25,9 @@ test = [
2525 " pytest" ,
2626 " pytest-cov" ,
2727]
28+ typechecking = [
29+ " pytest" ,
30+ ]
2831
2932[project ]
3033authors = [
@@ -69,9 +72,6 @@ paths.source = [
6972 " .tox*/*/lib/python*/site-packages" ,
7073]
7174
72- [tool .mypy ]
73- explicit_package_bases = true
74-
7575[tool .pytest .ini_options ]
7676addopts = [
7777 " --color=yes" ,
@@ -154,3 +154,7 @@ env.docs = {commands = [
154154) %}
155155gh.python."3.{{python_version}}" = [" py3{{python_version}}" ]
156156{%- endfor %}
157+
158+ [tool .ty ]
159+ analysis.respect-type-ignore-comments = false
160+ terminal.error-on-warning = true
Original file line number Diff line number Diff line change 11"""{{cookiecutter.package_name}} package."""
22
3- from ._version import __version__ # noqa: F401
3+ from ._version import __version__ # noqa: F401 # ty: ignore[unresolved-import]
44
55
66def example_function (argument : str , keyword_argument : str = "default" ) -> str :
You can’t perform that action at this time.
0 commit comments