Skip to content

Commit daa725b

Browse files
Fix posargs being passed to tox commands as list
1 parent 99f8aa5 commit daa725b

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

template/pyproject.toml.jinja

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ commands = [
9595
"run",
9696
#"--all-files",
9797
"--show-diff-on-failure",
98-
"{posargs}",
98+
{ replace = "posargs", default = [], extend = true },
9999
],
100100
]
101101

@@ -104,7 +104,15 @@ description = "Run type-checking"
104104
allowlist_externals = ["{{ type_checker }}"]
105105
# needed otherwise throws reportUnknownMemberType errors
106106
deps = ["pytest"]
107-
commands = [["{{ type_checker }}", "src", "{posargs}"]]
107+
commands = [
108+
[
109+
"{{ type_checker }}",
110+
"src",
111+
"tests",
112+
{ replace = "posargs", default = [
113+
], extend = true },
114+
],
115+
]
108116

109117
[tool.tox.env.tests]
110118
description = "Run tests"
@@ -113,12 +121,13 @@ commands = [
113121
[
114122
"pytest",
115123
"-vv",
116-
"--cov={{ package_name}}",
124+
"--cov=python_copier_template_example",
117125
"--cov-report",
118126
"term",
119127
"--cov-report",
120128
"xml:cov.xml",
121-
"{posargs}",
129+
{ replace = "posargs", default = [
130+
], extend = true },
122131
],
123132
]
124133

0 commit comments

Comments
 (0)