Ty 0.0.32#1548
Conversation
Bumps [ty](https://github.com/astral-sh/ty) from 0.0.24 to 0.0.32. - [Release notes](https://github.com/astral-sh/ty/releases) - [Changelog](https://github.com/astral-sh/ty/blob/main/CHANGELOG.md) - [Commits](astral-sh/ty@0.0.24...0.0.32) --- updated-dependencies: - dependency-name: ty dependency-version: 0.0.32 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Updates the ty type-checker dependency to 0.0.32 and aligns project config/tests/code with stricter typing expectations introduced by the newer version.
Changes:
- Bumped
tyto0.0.32and adjustedty.tomlignore rules. - Updated many pytest fixtures and mocks to use more precise typing (notably
Generator[...]) and standardizedcall(...)usage. - Tweaked a couple of production methods to return concrete
list/floatvalues rather than view/Any-typed values.
Reviewed changes
Copilot reviewed 24 out of 24 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| ty.toml | Removes some ignored ty diagnostics, presumably no longer needed after the upgrade. |
| pyproject.toml | Bumps ty dependency to 0.0.32. |
| ardupilot_methodic_configurator/tempcal_imu.py | Returns concrete lists/floats to satisfy stricter typing. |
| ardupilot_methodic_configurator/data_model_template_overview.py | Returns a concrete list of attribute keys instead of a dict view. |
| tests/unit_frontend_tkinter_software_update.py | Avoids call name shadowing; uses imported call(...) consistently. |
| tests/unit_backend_internet.py | Tightens fixture return type annotations to Generator[...]. |
| tests/test_tempcal_imu.py | Adds Generator typing for fixtures. |
| tests/test_frontend_tkinter_usage_popup_window.py | Adds Generator typing for fixtures. |
| tests/test_frontend_tkinter_stage_progress.py | Uses ttk classes directly and imports ttk. |
| tests/test_frontend_tkinter_parameter_editor_table.py | Adds Generator typing for tkinter root fixture. |
| tests/test_frontend_tkinter_parameter_editor_documentation_frame.py | Adjusts mocked helper return type to Optional[str] for URL. |
| tests/test_frontend_tkinter_flightcontroller_connection_progress.py | Adds Generator typing for fixtures. |
| tests/test_frontend_tkinter_entry_dynamic.py | Adds Generator typing for widget setup fixture. |
| tests/test_frontend_tkinter_component_editor_base.py | Adds Generator typing for editor fixture. |
| tests/test_frontend_tkinter_component_editor.py | Adds Generator typing for editor fixture. |
| tests/test_extract_param_defaults.py | Adds Generator typing; standardizes calls with imported call(...). |
| tests/test_extract_missing_translations.py | Adds Generator typing for temp directory fixture. |
| tests/test_data_model_flightcontroller_info.py | Refines fixture return type for mocked mavutil enums. |
| tests/test_backend_flightcontroller_connection.py | Introduces TYPE_CHECKING import and refines factory method annotations. |
| tests/test_backend_filesystem_configuration_steps.py | Standardizes mocks/calls; refines mock parameter annotations. |
| tests/test_backend_filesystem.py | Uses mock_open() directly (instead of unittest.mock.mock_open). |
| tests/conftest.py | Changes fixture return type to VehicleComponents. |
| tests/bdd_frontend_tkinter_show.py | Changes an autouse fixture to be typed as a Generator. |
| tests/acceptance_use_fc_params_from_file.py | Adds Generator typing for temporary directory fixture. |
| def create( # pylint: disable=too-many-arguments, too-many-positional-arguments | ||
| self, | ||
| device: str, | ||
| baudrate: int, | ||
| timeout: float = 5.0, | ||
| retries: int = 3, | ||
| progress_callback: object = None, | ||
| ) -> object: | ||
| progress_callback: Optional[object] = None, # noqa: UP045 | ||
| ) -> Optional[MavlinkConnection]: # noqa: UP045 |
There was a problem hiding this comment.
This override broadens the return type to Optional[MavlinkConnection] and also changes the progress_callback type compared to the base factory method, which can cause override/type-check failures now that the # type: ignore[override] was removed. Since this implementation always raises, prefer annotating the return type as NoReturn (or keep it identical to the base method’s return type) and match the base signature’s parameter types to satisfy LSP/override rules.
☂️ Python Coverage
Overall Coverage
New FilesNo new covered files... Modified FilesNo covered modified files...
|
Test Results 4 files 4 suites 42m 1s ⏱️ Results for commit df50186. |
Description
Describe what this PR is trying to achieve. Please read our Contributing Guide for detailed guidelines.
Checklist
git commit --signoff)Testing
Describe how you tested these changes: