Skip to content
Merged
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
2 changes: 1 addition & 1 deletion tests/test_misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def test_gt():

def test_eq():
# Compare with other OptionalDependencyEnum instances
assert OptDeps.PACKAGING == OptDeps.PACKAGING
assert OptDeps.PACKAGING is OptDeps.PACKAGING
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

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

This is still a self-comparison and is always true, so it doesn’t meaningfully test OptionalDependencyEnum.__eq__ behavior. It also may still trigger the same “compared with itself” linter rule (the repo enables Ruff ALL). Consider asserting against an equivalent expression that isn’t syntactically identical (e.g., via OptDeps["PACKAGING"] / getattr(OptDeps, "PACKAGING")) so you still validate the equality path without a self-comparison.

Suggested change
assert OptDeps.PACKAGING is OptDeps.PACKAGING
assert OptDeps.PACKAGING == OptDeps["PACKAGING"]

Copilot uses AI. Check for mistakes.
assert not OptDeps.PACKAGING == OptDeps.PYTEST # noqa: SIM201

# Compare with an unsupported type
Expand Down
Loading