Skip to content

feat(rules): offer nox's .nox environments in Python projects - #11

Merged
Finjineersdev merged 1 commit into
mainfrom
feat-rules-python-nox
Nov 27, 2026
Merged

Finjineersdev merged 1 commit into
mainfrom
feat-rules-python-nox

Conversation

@Finjineersdev

Copy link
Copy Markdown
Owner

What

nox keeps its session virtualenvs in ./.nox. From its docs (https://nox.thea.codes/en/stable/usage.html): "By default Nox stores virtualenvs in ./.nox, however, you can change this using --envdir".

The Python rule already offers .tox as Safe; .nox is the same kind of folder for nox, and the next nox run recreates it. This adds it as Safe, restore hint nox.

Why it is safe

  • It is only a candidate in a folder the Python rule already detects (pyproject.toml, requirements.txt or setup.py) and only when .nox exists.
  • The guard still checks it like every other folder: tracked files, links, the project's activity and pins all refuse it as before. Nothing in guard.rs, deny.rs or the linter changes.

Changes

  • engine/rules/python.toml: the .nox artifact, with the doc link in a comment.
  • New fixture engine/rules/fixtures/python/match/noxfile (expects .venv and .nox).
  • README "What it cleans" table: .nox under Python, Safe.
  • tests/snapshots/rules-check.json: 32 artifacts instead of 31.

How tested

  • rule_fixtures_produce_the_expected_candidates fails without the rule (the new fixture expects .nox) and passes with it.
  • cargo fmt --all --check: ok
  • cargo clippy --all-targets --locked -- -D warnings: ok
  • cargo test --locked: 145 passed, 0 failed
  • cargo run -q -p opensweep-cli -- rules-check rules: 11 rule files, 32 artifacts: ok
  • cd CleanCore && swift test (it decodes the engine's snapshots): 21 tests, 0 failures; scripts/check-swift-never-deletes.sh: ok

RULE-SCHEMA asks for two reviewers on rule changes.

🤖 Generated with Claude Code

nox keeps its session virtualenvs in ./.nox by default ("By default Nox
stores virtualenvs in ./.nox", https://nox.thea.codes/en/stable/usage.html).
Like .tox, the next nox run recreates them, so .nox is Safe. It is only a
candidate in a folder the Python rule already detects, and the guard
still checks it like every other folder.

New fixture python/match/noxfile; the rules-check snapshot counts 32
artifacts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Finjineersdev
Finjineersdev merged commit f3ee2d4 into main Nov 27, 2026
6 checks passed
@Finjineersdev
Finjineersdev deleted the feat-rules-python-nox branch November 27, 2026 22:49
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