@@ -17,9 +17,7 @@ dynamic = ["version"]
1717license.file = "LICENSE"
1818readme = "README.md"
1919requires-python = ">=3.10"
20-
21- [project.optional-dependencies]
22- dev = [
20+ optional-dependencies = { dev = [
2321 "build",
2422 "copier",
2523 {% if type_checker =="mypy" %} "mypy",
@@ -37,17 +35,11 @@ dev = [
3735 {% endif %} "tox-uv",
3836 "twine",
3937 "types-mock",
40- ]
41-
42- [project.scripts]
43- {{ repo_name }} = "{{ package_name }}.__main__:main"
44-
45- [project.urls]
46- GitHub = "{{ repo_url }}"
47-
48- [[project.authors]] # Further authors may be added by duplicating this section
49- email = "{{ author_email }}"
50- name = "{{ author_name }}"
38+ ] }
39+ scripts = { {{ repo_name }} = "{{ package_name }}.__main__:main" }
40+ urls = { GitHub = "{{ repo_url }}" }
41+ # Further authors may be added by appending to this list
42+ authors = [ { email = "{{ author_email }}", name = "{{ author_name }}" } ]
5143
5244[tool.uv]
5345default-groups = []
@@ -63,6 +55,8 @@ typeCheckingMode = "standard"
6355{% endif %}{% if type_checker =="mypy" %}
6456[tool.mypy]
6557ignore_missing_imports = true # Ignore missing stubs in imported modules
58+ explicit_package_bases = true
59+ #no_namespace_packages = true
6660{% endif %}
6761[tool.pytest.ini_options]
6862# Run pytest with all our checkers, and don't spam us with massive tracebacks on error
@@ -101,7 +95,7 @@ commands = [
10195 "run",
10296 #"--all-files",
10397 "--show-diff-on-failure",
104- { replace = " posargs", default = [], extend = true } ,
98+ "{ posargs}" ,
10599 ],
106100]
107101
@@ -110,15 +104,7 @@ description = "Run type-checking"
110104allowlist_externals = ["{{ type_checker }}"]
111105# needed otherwise throws reportUnknownMemberType errors
112106deps = ["pytest"]
113- commands = [
114- [
115- "{{ type_checker }}",
116- "src",
117- "tests",
118- { replace = "posargs", default = [
119- ], extend = true },
120- ],
121- ]
107+ commands = [["{{ type_checker }}", "src", "{posargs}"]]
122108
123109[tool.tox.env.tests]
124110description = "Run tests"
@@ -127,13 +113,12 @@ commands = [
127113 [
128114 "pytest",
129115 "-vv",
130- "--cov=python_copier_template_example ",
116+ "--cov={{ package_name}} ",
131117 "--cov-report",
132118 "term",
133119 "--cov-report",
134120 "xml:cov.xml",
135- { replace = "posargs", default = [
136- ], extend = true },
121+ "{posargs}",
137122 ],
138123]
139124
0 commit comments