Repository navigation
chore: ruff and mypy --strict clean, enforced in CI - #7
Merged
Merged
Conversation
- ruff.toml: E, F, W, I, UP, B for py39, line length 120; UP045/UP007 ignored to keep typing.Optional (X | None needs 3.10 at runtime). Safe autofixes applied (imports sorted/unused, quoted annotations, collections.abc), imports moved to the top of oauth.py, long lines wrapped. - mypy --strict: 180 -> 0. Bare dict/list/tuple annotations parameterized; python_version 3.10 (mypy 2 rejects 3.9 as a target); warn_return_any off since methods return decoded JSON. - tests.yaml: lint job running pinned ruff 0.17.0 and mypy 2.4.0. - CONTRIBUTING / docs/contributing.md: current lint commands and how to run the integration tests. No behaviour change: 336 unit tests pass, integration suite passes on GLPI 10.0.28, 11.0.9 and 12.0.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Giovanny Rodriguez <giovanny.rodriguez@imagunet.com>
giovanny07
force-pushed
the
chore/lint-types
branch
from
October 13, 2026 17:31
4f1c7e5 to
8f7b0a0
Compare
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.
What changes
ruff.toml: rules E, F, W, I, UP and B for Python 3.9, line length 120.UP045/UP007are ignored to keeptyping.Optional, becauseX | Noneneeds 3.10 at runtime forget_type_hints. Safe autofixes applied; the misplaced imports inoauth.pymoved to the top; long lines wrapped.--strict: from 180 errors to 0.dict/list/tupleannotations are now parameterized.python_version = 3.10, because mypy 2 no longer accepts 3.9 as a target; the CI tests still run on 3.9.warn_return_anyis off, since the methods return decoded JSON.lintjob with pinnedruff==0.17.0andmypy==2.4.0, so a new release of either tool cannot break CI on unchanged code.Not applied:
ruff format. It would reformat 18 files with no functional change.Verification
ruff check .: clean.mypy glpi_utils: clean.🤖 Generated with Claude Code