Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR upgrades the minimum Python version from 3.9 to 3.10, enabling the use of modern Python type hint syntax (PEP 604 union types with |) and contemporary library versions. The changes modernize type annotations, update dependencies, remove Python 3.9 from CI/CD workflows, and apply stricter linting rules.
- Replaced
Optional[X],Union[X, Y], andList[X]with modern syntax (X | None,X | Y,list[X]) - Updated dependencies to latest versions (click, pytest, ruff, mypy, sphinx, etc.)
- Enhanced error handling with improved exception messages and stack level specifications
- Expanded ruff linting to check all rules with selective ignores
Reviewed Changes
Copilot reviewed 42 out of 43 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| pyproject.toml | Updated Python requirement to 3.10+, modernized dependency versions, and expanded linting configuration |
| tests/conftest.py | Refactored type imports and improved test collection logic with better warnings |
| aiogram_i18n/utils/*.py | Modernized type hints across utility modules |
| aiogram_i18n/types.py | Replaced typing imports with modern union syntax and TypeAlias |
| aiogram_i18n/cores/*.py | Updated type annotations and improved error handling in core modules |
| aiogram_i18n/managers/*.py | Modernized manager type hints and added abstract method decorators |
| .github/workflows/*.yml | Removed Python 3.9 from test matrix and updated action versions |
Comments suppressed due to low confidence (1)
pyproject.toml:1
- The version 'pytest-cov==7.0.0' does not exist. As of January 2025, the latest version of pytest-cov is in the 5.x series (e.g., 5.0.0). Version 7.0.0 is specified but may not be available.
[project]
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
No description provided.