Skip to content

style(python): clarify unused arguments - #19113

Merged
Tobias Brick (tobiasb-ms) merged 2 commits into
microsoft:4.0from
tobiasb-ms:tobiasb-ms/ruff-unused-arguments
Oct 8, 2026
Merged

Tobias Brick (tobiasb-ms) merged 2 commits into
microsoft:4.0from
tobiasb-ms:tobiasb-ms/ruff-unused-arguments

Conversation

@tobiasb-ms

Copy link
Copy Markdown
Contributor

Summary

Mark fixture-only dependencies explicitly, discard required callback parameters, and iterate mapping keys directly when values are unused.

Remove the baseline suppressions for ARG001, ARG002, and B007 after resolving every existing finding. The cleanup and enforcement changes remain split into separate commits.

This continues the focused Ruff cleanup following #19111.

Validation

  • pre-commit run --all-files
  • Control Tower tests: 20 passed
  • image test suite: all 72 tests collected through the modified pytest plugin
  • changed-file compile and startup smoke checks

Mark fixture-only dependencies explicitly, discard required callback parameters, and iterate mapping keys when values are unused.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Remove the baseline suppressions for ARG001, ARG002, and B007 after resolving every existing finding.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@tobiasb-ms
Tobias Brick (tobiasb-ms) requested a review from a team as a code owner October 8, 2026 18:07
Copilot AI balanced review requested due to automatic review settings October 8, 2026 18:07
@tobiasb-ms
Tobias Brick (tobiasb-ms) marked this pull request as draft October 8, 2026 18:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The focused cleanup preserves behavior, has reported validation, and has no unresolved findings.

0 open findings

What changed in this PR

Continues the focused Python lint cleanup by making unused arguments explicit without changing behavior.

Changes:

  • Preserve fixture execution through usefixtures.
  • Discard unused callback parameters and iterate mapping keys directly.
  • Enable Ruff rules ARG001, ARG002, and B007.
File Description
scripts/​repo/​synthesize-repodata.py Remove unused loop value and discard callback parameter.
scripts/​ci/​control-tower/​tests/​test_package_build.py Declare fixture-only dependency with usefixtures.
ruff.toml Remove three baseline rule suppressions.
base/​images/​tests/​utils/​pytest_plugin.py Explicitly discard unused hook parameter.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@tobiasb-ms

Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
2 pipeline(s) were filtered out due to trigger conditions.

@tobiasb-ms
Tobias Brick (tobiasb-ms) marked this pull request as ready for review October 8, 2026 18:35
@tobiasb-ms

Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
2 pipeline(s) were filtered out due to trigger conditions.

@tobiasb-ms
Tobias Brick (tobiasb-ms) merged commit 51e729b into microsoft:4.0 Oct 8, 2026
14 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.

3 participants