-
Notifications
You must be signed in to change notification settings - Fork 12
Improve typing to mypy mostly-strict #437
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request improves type annotations throughout the codebase to achieve mypy mostly-strict compliance. The changes are largely mechanical, adding return type annotations (-> None) to methods and properly typing *args and **kwargs parameters.
Key Changes
- Migrated mypy configuration from
mypy.initopyproject.tomlwith strict mode enabled - Added
-> Nonereturn type annotations to hundreds of methods - Added
Anytype annotations to*argsand**kwargsparameters - Improved return type annotations for various methods
- Fixed type-related issues and removed unnecessary type: ignore comments
Reviewed changes
Copilot reviewed 278 out of 278 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| pyproject.toml | Adds strict mypy configuration with selective disabling of implicit_reexport and disallow_any_generics |
| mypy.ini | Removed legacy mypy configuration file |
| examples/*.py | Added -> None return type annotations to __init__ and lifecycle methods across 15+ example files |
| edg/parts/*.py | Added -> None return type annotations to lifecycle methods and Any typing for variadic parameters across 100+ part files |
| edg/electronics_model/*.py | Added type annotations and improved type hints for electronics model classes |
| edg/core/*.py | Enhanced type annotations for core framework classes with proper return types and parameter typing |
| edg/hdl_server/main.py | Added return type annotations and removed unnecessary type: ignore comments |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Mostly mechanical fixes to type annotations. A lot of adding -> None , or *args: Any.
Some code logic cleanup that does not affect output.
Two checks are currently ignored, which may be fixed in future PRs:
__all__)