Skip to content

fix: ci poetry venv and pre-commit pyupgrade - #349

Merged
msoedov merged 2 commits into
mainfrom
fix/pre-commit-pyupgrade
Sep 22, 2026
Merged

msoedov merged 2 commits into
mainfrom
fix/pre-commit-pyupgrade

Conversation

@msoedov

@msoedov msoedov commented Sep 22, 2026

Copy link
Copy Markdown
Owner

Stacked on fix/ci-poetry-venv, includes its commit.

  • CI: poetry.toml sets virtualenvs.create=false, so poetry installed into the runner's system Python 3.12 and failed. Force venv creation in CI via POETRY_VIRTUALENVS_CREATE; drop the unused poetry cache from release.
  • pre-commit: pyupgrade --py314-plus rewrote the quoted return annotation from fix(refusal_classifier): quote self-referential annotation to fix import NameError聽#345. On 3.14 (required by the project) annotations are lazy (PEP 649), so the unquoted form imports fine.

Verified locally on 3.14: module import OK, pytest 440 passed / 5 skipped, pre-commit run --all-files all passed.

馃 Generated with Claude Code

poetry.toml sets virtualenvs.create=false, so pipx poetry installed into
the runner's system Python 3.12 and failed uninstalling Debian packages.
Force venv creation in CI via POETRY_VIRTUALENVS_CREATE. Drop the poetry
cache from release, which never creates a venv.
pyupgrade --py314-plus rewrites the quoted return annotation added in #345,
failing pre-commit. The project requires Python 3.14, where annotations are
evaluated lazily (PEP 649), so the unquoted form imports fine.
@msoedov
msoedov merged commit b9755a9 into main Sep 22, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant