XanaduAI / MrMustard

A differentiable bridge between phase space and Fock space
https://mrmustard.readthedocs.io/
Apache License 2.0
78 stars 27 forks source link

fix type hint for python 3.9 #464

Closed timmysilv closed 3 months ago

timmysilv commented 3 months ago

you can't type-hint with | in python 3.9, so I'm righting my wrong

apchytr commented 3 months ago

Can you try from __future__ import annotations instead? I could swear there's a way to make it work with 3.9

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 89.21%. Comparing base (2df4c6d) to head (7b19536). Report is 2 commits behind head on develop.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #464 +/- ## =========================================== + Coverage 89.12% 89.21% +0.09% =========================================== Files 101 102 +1 Lines 7059 7194 +135 =========================================== + Hits 6291 6418 +127 - Misses 768 776 +8 ``` | [Files](https://app.codecov.io/gh/XanaduAI/MrMustard/pull/464?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XanaduAI) | Coverage Δ | | |---|---|---| | [mrmustard/utils/settings.py](https://app.codecov.io/gh/XanaduAI/MrMustard/pull/464?src=pr&el=tree&filepath=mrmustard%2Futils%2Fsettings.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XanaduAI#diff-bXJtdXN0YXJkL3V0aWxzL3NldHRpbmdzLnB5) | `100.00% <100.00%> (ø)` | | ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/XanaduAI/MrMustard/pull/464?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XanaduAI). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XanaduAI) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://app.codecov.io/gh/XanaduAI/MrMustard/pull/464?dropdown=coverage&src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XanaduAI). Last update [f46c048...7b19536](https://app.codecov.io/gh/XanaduAI/MrMustard/pull/464?dropdown=coverage&src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XanaduAI). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=XanaduAI).