Skip to content

Commit fb33481

Browse files
committed
Define noxconfig values as iterable & set defaults with immutable type tuple to reduce warnings
1 parent ab5faa6 commit fb33481

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

noxconfig.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,13 @@ class Config:
5151
"project-template",
5252
"idioms",
5353
)
54-
python_versions = ["3.9", "3.10", "3.11", "3.12", "3.13"]
55-
exasol_versions = ["7.1.9"]
56-
plugins = [UpdateTemplates]
54+
python_versions: Iterable = ("3.9", "3.10", "3.11", "3.12", "3.13")
55+
exasol_versions: Iterable = ("7.1.9",)
56+
plugins: Iterable[object] = (UpdateTemplates,)
5757
# need --keep-runtime-typing, as pydantic with python3.9 does not accept str | None
5858
# format, and it is not resolved with from __future__ import annotations. pyupgrade
5959
# will keep switching Optional[str] to str | None leading to issues.
60-
pyupgrade_args = ("--py39-plus", "--keep-runtime-typing")
60+
pyupgrade_args: Iterable[str] = ("--py39-plus", "--keep-runtime-typing")
6161

6262

6363
PROJECT_CONFIG = Config()

project-template/{{cookiecutter.repo_name}}/noxconfig.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ class Config:
1717
/ "version.py"
1818
)
1919
path_filters: Iterable[str] = ()
20-
pyupgrade_args = ("--py{{cookiecutter.python_version_min | replace('.', '')}}-plus",)
21-
plugins = []
20+
pyupgrade_args: Iterable[str] = ("--py{{cookiecutter.python_version_min | replace('.', '')}}-plus",)
21+
plugins: Iterable[object] = ()
2222

2323

2424
PROJECT_CONFIG = Config()

0 commit comments

Comments
 (0)