You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is expected. Static type checking is (unfortunately) fundamentally incompatible with annotating arrays.
You should either add the appropriate flag to disable pyright's checking here, or define batch = None elsewhere in the file so that pyright thinks this is a forward reference.
Setup
pyright
: 1.1.263pytorch
: 1.12.0+cu113torchtyping
: 0.1.4Code Example
Problem
Pyright reports the following error:
"batch" is not defined
Related issue
The same error is reported by mypy when
-1
is omitted: #35The text was updated successfully, but these errors were encountered: