Skip to content

Pyright reports an error with named axis #38

@Luceurre

Description

@Luceurre

Setup

  • pyright: 1.1.263
  • pytorch: 1.12.0+cu113
  • torchtyping: 0.1.4

Code Example

from torchtyping import TensorType

def example(foo: TensorType["batch"]):
    pass

Problem

Pyright reports the following error: "batch" is not defined

Related issue

The same error is reported by mypy when -1 is omitted: #35

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions