Skip to content

Conversation

@ducky64
Copy link
Collaborator

@ducky64 ducky64 commented Nov 27, 2025

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:

  • explicit export (module-level __all__)
  • default Any in Generics, allowing the usage of things like Port in type signatures

Copy link

Copilot AI left a 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.ini to pyproject.toml with strict mode enabled
  • Added -> None return type annotations to hundreds of methods
  • Added Any type annotations to *args and **kwargs parameters
  • 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.

@ducky64 ducky64 merged commit b30392e into master Nov 27, 2025
17 of 18 checks passed
@ducky64 ducky64 deleted the improved-typing branch November 27, 2025 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants