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

Update pyright #674

Merged
merged 6 commits into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion bioimageio/spec/_get_conda_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ def _get_default_pytorch_env(
# https://pytorch.org/get-started/previous-versions/
v = str(pytorch_version)
deps: List[Union[str, PipDeps]] = [f"pytorch=={v}"]
if v == "1.6.0":
if v == "1.5.1":
deps += ["torchvision==0.6.1"]
elif v == "1.6.0":
deps += ["torchvision==0.7.0"]
elif v == "1.7.0":
deps += ["torchvision==0.8.0", "torchaudio==0.7.0"]
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"jupyter",
"pdoc",
"pre-commit",
"pyright==1.1.388",
"pyright==1.1.390",
"ruff",
],
},
Expand Down
3 changes: 2 additions & 1 deletion tests/test_get_conda_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ def test_get_default_pytorch_env():

versions: Dict[str, List[Optional[str]]] = {
"pytorch": [
"1.5.1",
"1.6.0",
"1.7.0",
"1.7.1",
Expand Down Expand Up @@ -135,5 +136,5 @@ def assert_lt(p: str, i: int):
for i in range(len(versions["pytorch"]) - 1):
assert_lt("pytorch", i)
assert_lt("torchvision", i)
if i > 0:
if i > 1:
assert_lt("torchaudio", i)
2 changes: 1 addition & 1 deletion tests/test_internal/test_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def test_type_is_usable(name: str):
args = TYPE_ARGS[typ]
if not isinstance(args, tuple):
args = (args,)
_ = typ(*args)
_ = typ(*args) # type: ignore
elif isinstance(typ, str):
pass # ignore string constants
else:
Expand Down
2 changes: 2 additions & 0 deletions tests/utils.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""utils to test bioimageio.spec"""

import os
from contextlib import nullcontext
from copy import deepcopy
Expand Down
Loading