Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Enables Ruff’s pylint (PL) rule set and configures a small set of global and per-path ignores to accommodate established patterns in the codebase (constructors with many args, lazy imports, factory-style returns, and complex generator scripts).
Changes:
- Enable Ruff pylint rules (
PL) and add targeted global ignores (PLR0913,PLC0415,PLR0911) inpyproject.toml. - Add per-file ignores for tests (
PLR2004) and utils (PLR0912,PLR0915). - Add
# noqa: PLR2004suppressions for a few intentional “magic value” comparisons (HTTP status codes and JWT segment count).
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
pyproject.toml |
Turns on PL lint rules and configures global + per-path ignores to keep lint signal actionable. |
pyoverkiz/response_handler.py |
Suppresses PLR2004 for an explicit 503 status handling branch. |
pyoverkiz/client.py |
Suppresses PLR2004 for explicit 204 (No Content) response handling. |
pyoverkiz/auth/strategies.py |
Suppresses PLR2004 for explicit 204 handling and JWT segment-count validation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Add targeted ignores for API model patterns (too many args, lazy imports, many returns) - Allow magic values in tests and complex logic in utils - Suppress PLR2004 for HTTP status code and JWT segment comparisons
Use http.HTTPStatus instead of raw integers for status code comparisons, eliminating all PLR2004 noqa suppressions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PLR0913globally (model constructors have many args by design)PLC0415globally (intentional lazy imports for boto3/warrant-lite)PLR0911globally (factory functions with many return statements)PLR2004in tests (magic values are fine in assertions)PLR0912/PLR0915in utils (generator scripts are inherently complex)Test plan
ruff check .passespytest— 280 tests passmypypasses