Skip to content

Commit

Permalink
Merge pull request #578 from mit-ll-responsible-ai/pyright-bump
Browse files Browse the repository at this point in the history
bump pyright
  • Loading branch information
rsokl authored Nov 9, 2023
2 parents 5e152bf + b414cfe commit be15cb1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 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.334
pyright==1.1.335
10 changes: 5 additions & 5 deletions tests/annotations/declarations.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def check_partial_builds_on_function():

reveal_type(
conf_f_partial(),
expected_text="ZenPartialBuilds[(x: int) -> int] | HydraPartialBuilds[(x: int) -> int]",
expected_text="HydraPartialBuilds[(x: int) -> int] | ZenPartialBuilds[(x: int) -> int]",
)

conf_f_partial_instance = conf_f_partial()
Expand Down Expand Up @@ -604,7 +604,7 @@ def f(x: int, y: str, z: bool = False):
conf2 = Conf_f_partial(not_a_valid_arg=1) # should be ok
reveal_type(
conf2,
expected_text="ZenPartialBuilds[(x: int, y: str, z: bool = False) -> C] | HydraPartialBuilds[(x: int, y: str, z: bool = False) -> C]",
expected_text="HydraPartialBuilds[(x: int, y: str, z: bool = False) -> C] | ZenPartialBuilds[(x: int, y: str, z: bool = False) -> C]",
)

# specifying `populate_full_signature=False` should disable sig-reflection
Expand Down Expand Up @@ -1432,7 +1432,7 @@ def foo(x: int) -> str:


def check_BuildsFn():
my_builds = BuildsFn[int]("my_builds")
my_builds = BuildsFn[int].builds
my_builds(int, 1)
my_builds(int, "a") # type: ignore

Expand All @@ -1441,7 +1441,7 @@ def check_make_custom_reflection():
def foo(x: int):
...

bb = BuildsFn[int]("a")
bb = BuildsFn[int]

pb = make_custom_builds_fn(zen_partial=True, builds_fn=bb)
assert_type(pb, PBuilds[int])
Expand Down Expand Up @@ -1471,7 +1471,7 @@ class C:
def foo(x: A):
...

bg = BuildsFn[Union[SupportedPrimitive, A]]("a")
bg = BuildsFn[Union[SupportedPrimitive, A]].builds

assert_type(bg(A, A()), Type[Builds[Type[A]]])
assert_type(bg(A, B()), Type[Builds[Type[A]]])
Expand Down

0 comments on commit be15cb1

Please sign in to comment.