Skip to content

Enable ruff A rule (builtin shadowing detection)#2005

Merged
iMicknl merged 1 commit intov2/mainfrom
v2/ruff-a
Apr 19, 2026
Merged

Enable ruff A rule (builtin shadowing detection)#2005
iMicknl merged 1 commit intov2/mainfrom
v2/ruff-a

Conversation

@iMicknl
Copy link
Copy Markdown
Owner

@iMicknl iMicknl commented Apr 19, 2026

Summary

  • Add flake8-builtins rule set with A002 globally ignored (model parameters like id, type intentionally match Overkiz API field names)
  • Rename shadowed input variable in test_obfuscate.py

Test plan

  • ruff check . passes
  • pytest — 280 tests pass

Copilot AI review requested due to automatic review settings April 19, 2026 17:21
@iMicknl iMicknl requested a review from tetienne as a code owner April 19, 2026 17:21
@iMicknl iMicknl added enhancement New feature or request v2 labels Apr 19, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR tightens linting by enabling Ruff’s flake8-builtins (A) rules across the repo while explicitly allowing builtin-shadowing for specific API-field-like parameter names, and fixes a single test case that previously shadowed a builtin.

Changes:

  • Enable Ruff flake8-builtins rules (A) and globally ignore A002 (intentional id/type parameter names).
  • Rename a shadowing local variable (inputdata) in tests/test_obfuscate.py.
  • Restructure Ruff ignore configuration into a multiline list for clarity.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
tests/test_obfuscate.py Renames input variable to avoid builtin shadowing under new Ruff rules.
pyproject.toml Enables Ruff A rules and adds global ignore for A002 to accommodate API field naming.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- Globally ignore A002 since id/type are API field names
- Rename shadowing local variable in test (input -> data)
@iMicknl iMicknl merged commit 6511168 into v2/main Apr 19, 2026
8 checks passed
@iMicknl iMicknl deleted the v2/ruff-a branch April 19, 2026 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request v2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants