Skip to content

Commit 7b8211c

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 1c1c905 commit 7b8211c

2 files changed

Lines changed: 14 additions & 3 deletions

File tree

src/tox/config/cli/parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def get_type(action: Action) -> type[Any]:
6666
of_type: type[Any] | None = getattr(action, "of_type", None)
6767
if of_type is None:
6868
if isinstance(action, argparse._AppendAction): # noqa: SLF001
69-
if action.nargs in ("+", "*") or (isinstance(action.nargs, int) and action.nargs > 1):
69+
if action.nargs in {"+", "*"} or (isinstance(action.nargs, int) and action.nargs > 1):
7070
of_type = list[list[action.type]] # ty: ignore[invalid-type-form] # nargs produces list per invocation
7171
else:
7272
of_type = list[action.type] # ty: ignore[invalid-type-form] # runtime generic from argparse action type

tests/session/test_env_select.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,19 @@ def test_factor_select(
157157
[
158158
("cov", ("py310-django20-cov", "py310-django21-cov", "py39-django20-cov", "py39-django21-cov")),
159159
("py39,django20", ("py39-django20-cov", "py39-django20")),
160-
("py39;py310", ("py310-django20-cov", "py310-django20", "py310-django21-cov", "py310-django21",
161-
"py39-django20-cov", "py39-django20", "py39-django21-cov", "py39-django21")),
160+
(
161+
"py39;py310",
162+
(
163+
"py310-django20-cov",
164+
"py310-django20",
165+
"py310-django21-cov",
166+
"py310-django21",
167+
"py39-django20-cov",
168+
"py39-django20",
169+
"py39-django21-cov",
170+
"py39-django21",
171+
),
172+
),
162173
],
163174
)
164175
def test_factor_select_via_env_var(

0 commit comments

Comments
 (0)