Skip to content
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

Typing issue with Optional[] #243

Closed
piotro888 opened this issue Mar 10, 2023 · 1 comment · Fixed by #656
Closed

Typing issue with Optional[] #243

piotro888 opened this issue Mar 10, 2023 · 1 comment · Fixed by #656
Labels
tests Tests and testbenches (not infrastructure)

Comments

@piotro888
Copy link
Member

Pyright doesn't recognize check for None case of Optional types with self.assertNotNone() method from our testing framework.

It is possible to fix that by using assert is not None, but pyright should be configured to correctly recognize self.assertIsNotNone() to be consistent with using other self.* verification functions in testbenches

@piotro888 piotro888 added good first issue Good for newcomers infrastructure CI, testing, etc. tests Tests and testbenches (not infrastructure) labels Mar 10, 2023
@tilk
Copy link
Member

tilk commented Mar 10, 2023

python/typeshed#8583
python/typing#930
microsoft/pyright#2007

This is a known issue, which I believe is not solved upstream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Tests and testbenches (not infrastructure)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants