Enforce Ruff complexity and argument limits - #22
Conversation
Reviewer's GuideThis PR enables Ruff’s C90 and PLR0913 rules with max-args enforcement by updating pyproject.toml, refactors the workspace manifest helper to accept a single _CrateSpec parameter, and adjusts the publish_fixtures fixture to pull dependencies via pytest’s request to comply with argument limits. Class diagram for refactored workspace manifest helperclassDiagram
class WorkspaceManifestHelper {
+from_crate_spec(crate_spec: _CrateSpec)
-metadata
}
class _CrateSpec {
+name
+version
+dependencies
}
WorkspaceManifestHelper -- _CrateSpec: derives metadata from
Class diagram for updated publish_fixtures fixtureclassDiagram
class PublishFixtures {
+__call__(request)
-dependencies
}
class PytestRequest {
+getfixturevalue(name)
}
PublishFixtures ..> PytestRequest: pulls dependencies from
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
WalkthroughThis pull request refactors test infrastructure by introducing a spec-based configuration pattern. Changes include updating Ruff linting rules in Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Areas requiring extra attention:
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
Summary
Testing
https://chatgpt.com/codex/tasks/task_e_6906190604748322b063d246911e8341
Summary by Sourcery
Enforce code complexity and argument limits via Ruff while refactoring test helpers to derive metadata from CrateSpec and streamline fixture assembly through pytest request
New Features:
Enhancements:
_write_crate_manifestto accept a CrateSpec object for deriving manifest metadatapublish_fixturesby retrieving fixtures via pytest's request object to reduce direct argumentsSummary by CodeRabbit