Skip to content

Remove two noqa comments that suppress nothing - #70840

Open
charzl wants to merge 2 commits into
saltstack:3008.xfrom
charzl:cleanup/blanket-noqa-raft-test
Open

charzl wants to merge 2 commits into
saltstack:3008.xfrom
charzl:cleanup/blanket-noqa-raft-test

Conversation

@charzl

@charzl charzl commented Nov 18, 2026

Copy link
Copy Markdown
Collaborator

What does this PR do?

Removes two bare # noqa comments in tests/pytests/functional/cluster/consensus/test_raft_service.py. Found by the Ruff checks from #70367 (PGH004).

from salt.cluster.consensus.raft.log import LogEntryType  # noqa

A bare # noqa hides every Ruff message on the line, so it also hides new ones. These two do not hide anything useful: LogEntryType is used a few lines later, so there is no unused import. I ran Ruff with --ignore-noqa on the two lines. The only rule that reports them, other than PGH004 itself, is PLC0415 (an import that is not at the top of the file). That rule is not enabled, and the matching pylint check (import-outside-toplevel) is disabled in .pylintrc. The other two imports of LogEntryType in the same file already have no noqa.

What issues does this PR fix or reference?

Refs #70367.

Previous Behavior / New Behavior

No change.

Testing

Only comments change. Ruff with the repository configuration reports nothing for the file, and the file still collects (51 tests).

Merge requirements satisfied?

  • Docs
  • Changelog
  • Tests written/updated

Commits signed with GPG?

No

@charzl charzl self-assigned this Nov 18, 2026
@charzl charzl added Argon v3008.0 test:full Run the full test suite labels Nov 18, 2026
@charzl charzl added this to the Argon v3008.7 milestone Nov 18, 2026
@charzl
charzl marked this pull request as ready for review November 18, 2026 20:01
@charzl
charzl requested a review from a team as a code owner November 18, 2026 20:01
The imports of LogEntryType in test_raft_service.py had a bare `# noqa`. The
name is used, so no unused-import check applies. The only rule that reports
these lines is PLC0415 (import not at the top of the file), which is not
enabled. Remove the comments.

Refs saltstack#70367.

This branch was previously deployed

1 inactive deployment
ci — afe9ad91 Deployed Nov 19, 2026 by charzl via Build Source Packages / Windows (amd64) #29293
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Argon v3008.0 test:full Run the full test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants