Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: include 3.13 in classifiers #851

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ci:

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
Expand All @@ -19,19 +19,19 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/tox-dev/pyproject-fmt
rev: "1.3.0"
rev: "2.2.4"
hooks:
- id: pyproject-fmt

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.3
rev: v0.6.8
hooks:
- id: ruff
args: ["--fix", "--show-fixes"]
- id: ruff-format

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.6.1
rev: v1.11.2
hooks:
- id: mypy
files: ^nox/
Expand All @@ -44,7 +44,7 @@ repos:
- uv

- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
rev: v2.3.0
hooks:
- id: codespell

Expand Down
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
level of experience, education, socioeconomic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards
Expand Down
2 changes: 1 addition & 1 deletion nox/_decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def _copy_func(src: T, name: str | None = None) -> T:
closure=src.__closure__,
)
dst.__dict__.update(copy.deepcopy(src.__dict__))
dst = functools.update_wrapper(dst, src)
dst = functools.update_wrapper(dst, src) # type: ignore[assignment]
dst.__kwdefaults__ = src.__kwdefaults__
return cast(T, dst)

Expand Down
6 changes: 3 additions & 3 deletions nox/_option_set.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,9 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
self.parser_args = args
self.parser_kwargs = kwargs
self.options: collections.OrderedDict[str, Option] = collections.OrderedDict()
self.groups: collections.OrderedDict[
str, OptionGroup
] = collections.OrderedDict()
self.groups: collections.OrderedDict[str, OptionGroup] = (
collections.OrderedDict()
)

def add_options(self, *args: Option) -> None:
"""Adds a sequence of Options to the OptionSet.
Expand Down
4 changes: 2 additions & 2 deletions nox/manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ def notify(
# Locate the session in the list of all sessions, and place it at
# the end of the queue.
for s in self._all_sessions:
if s == session or s.name == session or session in s.signatures:
if s == session or s.name == session or session in s.signatures: # noqa: PLR1714
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably should report this one to Ruff. It's not actually correct, since we are relying on short-circuiting here.

if posargs is not None:
s.posargs = list(posargs)
self._queue.append(s)
Expand Down Expand Up @@ -354,7 +354,7 @@ def __len__(self) -> int:
def keyword_match(expression: str, keywords: Iterable[str]) -> Any:
"""See if an expression matches the given set of keywords."""
locals = KeywordLocals(set(keywords))
return eval(expression, {}, locals) # noqa: PGH001
return eval(expression, {}, locals)


def _null_session_func_(session: Session) -> None:
Expand Down
6 changes: 2 additions & 4 deletions nox/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@


@overload
def session_decorator(__func: F) -> F:
...
def session_decorator(__func: F) -> F: ...


@overload
Expand All @@ -45,8 +44,7 @@ def session_decorator(
tags: Sequence[str] | None = ...,
*,
default: bool = ...,
) -> Callable[[F], F]:
...
) -> Callable[[F], F]: ...


def session_decorator(
Expand Down
2 changes: 1 addition & 1 deletion nox/virtualenv.py
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ def _check_reused_environment_type(self) -> bool:
return True

# Switching to "uv" is safe, but not the other direction (no pip)
if old_env in {"virtualenv", "venv"} and self.venv_backend == "uv":
if old_env in {"virtualenv", "venv"} and self.venv_backend == "uv": # noqa: SIM103
return True

return False
Expand Down
61 changes: 31 additions & 30 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,52 +36,50 @@ classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Software Development :: Testing",
]
dependencies = [
"argcomplete<4.0,>=1.9.4",
"colorlog<7.0.0,>=2.6.1",
"argcomplete<4,>=1.9.4",
"colorlog<7,>=2.6.1",
"packaging>=20.9",
'tomli>=1; python_version < "3.11"',
"tomli>=1; python_version<'3.11'",
"virtualenv>=20.14.1",
]
[project.optional-dependencies]
tox_to_nox = [
optional-dependencies.tox_to_nox = [
"jinja2",
"tox",
]
uv = [
optional-dependencies.uv = [
"uv>=0.1.6",
]
[project.urls]
bug-tracker = "https://github.com/wntrblm/nox/issues"
documentation = "https://nox.thea.codes"
homepage = "https://github.com/wntrblm/nox"
repository = "https://github.com/wntrblm/nox"
[project.scripts]
nox = "nox.__main__:main"
tox-to-nox = "nox.tox_to_nox:main"
urls.bug-tracker = "https://github.com/wntrblm/nox/issues"
urls.documentation = "https://nox.thea.codes"
urls.homepage = "https://github.com/wntrblm/nox"
urls.repository = "https://github.com/wntrblm/nox"
scripts.nox = "nox.__main__:main"
scripts.tox-to-nox = "nox.tox_to_nox:main"

[tool.hatch]
metadata.allow-ambiguous-features = true # disable normalization (tox-to-nox) for back-compat

[tool.ruff.lint]
extend-select = [
"B", # flake8-bugbear
"I", # isort
"C4", # flake8-comprehensions
"ICN", # flake8-import-conventions
"ISC", # flake8-implicit-str-concat
"PL", # pylint
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"RUF", # Ruff-specific
"SIM", # flake8-simplify
"UP", # pyupgrade
"YTT", # flake8-2020
"EXE", # flake8-executable
[tool.ruff]
lint.extend-select = [
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"EXE", # flake8-executable
"I", # isort
"ICN", # flake8-import-conventions
"ISC", # flake8-implicit-str-concat
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PL", # pylint
"RUF", # Ruff-specific
"SIM", # flake8-simplify
"UP", # pyupgrade
"YTT", # flake8-2020
]
ignore = [
lint.ignore = [
"ISC001", # Conflicts with formatter
"PLR09", # Too many X
"PLR2004", # Magic value used in comparison
Expand All @@ -90,6 +88,9 @@ ignore = [
[tool.isort]
profile = "black"

[tool.pyproject-fmt]
max_supported_python = "3.13"

[tool.pytest.ini_options]
minversion = "6.0"
addopts = [ "-ra", "--strict-markers", "--strict-config" ]
Expand Down
Loading