Skip to content

Commit

Permalink
Merge pull request #70 from rsokl/dependabot/pip/deps/main/pyright-1.…
Browse files Browse the repository at this point in the history
…1.374

Bump pyright from 1.1.373 to 1.1.374 in /deps
  • Loading branch information
rsokl authored Aug 1, 2024
2 parents fdb19f9 + f59cd60 commit 9569cb2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion deps/requirements-pyright.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
pyright==1.1.373
pyright==1.1.374
4 changes: 2 additions & 2 deletions src/phantom_tensors/_internals/dim_binding.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from functools import wraps
from typing import Any, Callable, Iterable, Optional, Tuple, Type, TypeVar, Union, cast

from typing_extensions import Final, TypeAlias
from typing_extensions import TypeAlias

import phantom_tensors._internals.utils as _utils
from phantom_tensors._internals.utils import LiteralLike, NewTypeLike, UnpackLike
Expand Down Expand Up @@ -92,7 +92,7 @@ def check(shape_type: Tuple[ShapeDimType, ...], shape: Tuple[int, ...]) -> bool:

# if variadic tuple is present, need to use negative indexing to reference
# location from the end of the tuple
CURRENT_INDEX: Final = n if var_field_ind is None else n - len(shape_type)
CURRENT_INDEX = n if var_field_ind is None else n - len(shape_type)

# The following symbols bind to dimensions (by symbol-reference)
# Some of them may also carry with them additional validation checks,
Expand Down
5 changes: 0 additions & 5 deletions tests/annotations.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,16 +77,11 @@ def check_bad_tensor_parse(x: tr.Tensor):


def check_readme_blurb_one():
from typing import NewType

import numpy as np

from phantom_tensors import parse
from phantom_tensors.numpy import NDArray

A = NewType("A", int)
B = NewType("B", int)

# runtime: checks that shapes (2, 3) and (3, 2)
# match (A, B) and (B, A) pattern
if sys.version_info < (3, 8):
Expand Down

0 comments on commit 9569cb2

Please sign in to comment.