Skip to content

Enable type-checking for tests - #414

Merged
thierry-martinez merged 3 commits into
TeamGraphix:masterfrom
thierry-martinez:typing_tests
Jan 21, 2026
Merged

Enable type-checking for tests#414
thierry-martinez merged 3 commits into
TeamGraphix:masterfrom
thierry-martinez:typing_tests

Conversation

@thierry-martinez

Copy link
Copy Markdown
Collaborator

This commit adds type annotations in all test files that were previously not covered, fixing some annotations in the tensor-network backend along the way. It enables full type-checking with mypy and pyright while preserving existing functionality across the entire code base, except for examples/.

Related issue:
This PR continues the work started in #302, #308, #312, and #347.

This commit adds type annotations in all test files that were
previously not covered, fixing some annotations in the tensor-network
backend along the way. It enables full type-checking with mypy and
pyright while preserving existing functionality across the entire code
base, except for `examples/`.
**Related issue:**
This PR continues the work started in TeamGraphix#302, TeamGraphix#308, TeamGraphix#312, and TeamGraphix#347.
@codecov

codecovBot commented Jan 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.61%. Comparing base (add1432) to head (94a740a).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files
@@ Coverage Diff @@## master #414 +/- ##
==========================================
- Coverage 86.65% 86.61% -0.04% 
==========================================
Files 44 44 Lines 6150 6150 ==========================================
- Hits 5329 5327 -2 - Misses 821 823 +2 

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@emlynsgemlynsg left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great to me, and passes Mypy locally and through CI.

@pranav97nair
pranav97nair requested review from pranav97nair and removed request for matulniJanuary 21, 2026 13:16

@pranav97nairpranav97nair left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Thanks.

@thierry-martinez
thierry-martinez merged commit cde29f3 into TeamGraphix:masterJan 21, 2026
24 checks passed
thierry-martinez added a commit to thierry-martinez/graphix that referenced this pull request Feb 11, 2026
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.
thierry-martinez added a commit that referenced this pull request Feb 23, 2026
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 #302, #308, #312, #347, and #414.
Sign up for freeto 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.

3 participants

@thierry-martinez@emlynsg@pranav97nair