Fix/update linting checking and formatting#1978
Draft
yuriverweij wants to merge 3 commits intorobotframework:masterfrom
Draft
Fix/update linting checking and formatting#1978yuriverweij wants to merge 3 commits intorobotframework:masterfrom
yuriverweij wants to merge 3 commits intorobotframework:masterfrom
Conversation
… support to 3.10+
- Updated type hints to use the new syntax (e.g., `list[str]` instead of `List[str]`). - Improved readability by replacing `isinstance` checks with more concise conditions. - Simplified exception handling and error messages for better clarity. - Enhanced the `WindowInfo` class by switching from `namedtuple` to `NamedTuple`. - Streamlined the `get_window_infos` method to reduce redundancy. - Replaced assertions in unit tests with assert statements for consistency. - Updated the linting task to allow automatic fixing of issues. - Removed unnecessary imports and cleaned up code formatting.
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.
This pull request modernizes the codebase by updating the minimum supported Python version to 3.10, switching code formatting and linting from Black and flake8 to Ruff, and updating relevant documentation and configuration files. It also updates type annotations to use Python 3.10+ syntax and cleans up imports for better readability and maintainability.
Python version and compatibility updates:
README.rst,docs/index.html), packaging (setup.py), and CI configuration (.github/workflows/CI.yml). Removed references to unsupported versions and updated PyPy version topypy-3.10.Linting and formatting tool migration:
pyproject.toml,.flake8removed), development requirements (requirements-dev.txt), and documentation (CONTRIBUTING.rst) to reflect this change.Type annotation modernization:
str | Noneinstead ofOptional[str],list[...]instead ofList[...]).General code cleanup and import improvements:
NamedTupleinstead ofnamedtuple).