Uh oh!
There was an error while loading. Please reload this page.
Enable type-checking for examples - #430
Conversation
This commit adds type annotations in all example modules, and refines the type of `PatternSimulator` constructor, so that the type parameter for states is automatically inferred from the `backend` argument. It enables full type-checking with mypy and pyright while preserving existing functionality across the entire code base. No files are ignored by the typers anymore. **Related issue:** This commit continues the work started in TeamGraphix#302, TeamGraphix#308, TeamGraphix#312, TeamGraphix#347, and TeamGraphix#414.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@## master #430 +/- ##
=======================================
Coverage 88.06% 88.06% =======================================
Files 44 44 Lines 6433 6433 =======================================
Hits 5665 5665 Misses 768 768 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
emlynsg
left a comment
There was a problem hiding this comment.
Looks good to me. Do we mind that there are still lots of Pyright warnings?
Actually, they were only three warnings:
There are 395 informations: we can see if there is something we can do with them at some point, but I consider it is out of the scope of this PR! |
matulni
left a comment
There was a problem hiding this comment.
Thanks for taking the time to do this! Looks good!
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This commit adds type annotations in all example modules, and refines the type of
PatternSimulatorconstructor, so that the type parameter for states is automatically inferred from thebackendargument.It enables full type-checking with mypy and pyright while preserving existing functionality across the entire code base. No files are ignored by the typers anymore.
Related issue:
This commit continues the work started in #302, #308, #312, #347, and #414.