Skip to content

Commit

Permalink
Merge pull request #714 from mit-ll-responsible-ai/dependabot/pip/dep…
Browse files Browse the repository at this point in the history
…s/main/pyright-1.1.374

Bump pyright from 1.1.371 to 1.1.374 in /deps
  • Loading branch information
rsokl authored Aug 1, 2024
2 parents 18ff6ad + d9ee3be commit 82fd8fb
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 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.371
pyright==1.1.374
2 changes: 1 addition & 1 deletion docs/source/explanation/hydrated_dataclass.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ configured fields, and flag bad inputs in our code. That this config is immutabl
from hydra_zen import hydrated_dataclass
from torch.optim import Adam
from torch.optim import Adam # type: ignore
@hydrated_dataclass(target=Adam, zen_partial=True, frozen=True)
class BuildsAdam:
Expand Down
4 changes: 2 additions & 2 deletions docs/source/tutorials/pytorch_lightning.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ following code. Here, we define our single-layer neural network and the `lightni
import torch as tr
import torch.nn as nn
import torch.nn.functional as F
from torch.optim import Optimizer
from torch.optim import Optimizer # type: ignore
from torch.utils.data import DataLoader, TensorDataset
from hydra_zen.typing import Partial
Expand Down Expand Up @@ -156,7 +156,7 @@ and trainer. We'll also define the task function that trains and tests our model
import pytorch_lightning as pl
from hydra_zen import builds, make_config, make_custom_builds_fn, zen
import torch as tr
from torch.optim import Adam
from torch.optim import Adam # type: ignore
from torch.utils.data import DataLoader
from zen_model import UniversalFuncModule, train_and_eval, single_layer_nn
Expand Down
2 changes: 1 addition & 1 deletion src/hydra_zen/structured_configs/_implementations.py
Original file line number Diff line number Diff line change
Expand Up @@ -903,7 +903,7 @@ def _sanitized_type(
if has_ellipses:
return Tuple[_unique_type, ...]
else:
return Tuple[(_unique_type,) * len(args)] # type: ignore
return Tuple[(_unique_type,) * len(args)]

return Any

Expand Down
2 changes: 1 addition & 1 deletion src/hydra_zen/typing/_builds_overloads.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ def __call__(
) -> Type[BuildsWithSig[Type[R], P]]: ...

@overload
def __call__(
def __call__( # pyright: ignore[reportOverlappingOverload]
self,
__hydra_target: Type[AnyBuilds[Importable]],
*,
Expand Down
10 changes: 5 additions & 5 deletions tests/annotations/declarations.py
Original file line number Diff line number Diff line change
Expand Up @@ -564,19 +564,19 @@ def f(x: int, y: str, z: bool = False):
# The following should be ok
reveal_type(
Conf_f(1, "hi"),
expected_text="BuildsWithSig[type[C], (x: int, y: str, z: bool = False)]",
expected_text="BuildsWithSig[type[C], (x: int, y: str, z: bool = ...)]",
)
reveal_type(
Conf_f(1, "hi", True),
expected_text="BuildsWithSig[type[C], (x: int, y: str, z: bool = False)]",
expected_text="BuildsWithSig[type[C], (x: int, y: str, z: bool = ...)]",
)
reveal_type(
Conf_f(1, y="hi"),
expected_text="BuildsWithSig[type[C], (x: int, y: str, z: bool = False)]",
expected_text="BuildsWithSig[type[C], (x: int, y: str, z: bool = ...)]",
)
reveal_type(
Conf_f(x=1, y="hi", z=False),
expected_text="BuildsWithSig[type[C], (x: int, y: str, z: bool = False)]",
expected_text="BuildsWithSig[type[C], (x: int, y: str, z: bool = ...)]",
)

# check instantiation
Expand Down Expand Up @@ -727,7 +727,7 @@ def f(x: int, y: str, z: bool = False):

reveal_type(
Conf,
expected_text="type[BuildsWithSig[type[int], (x: int, y: str, z: bool = False)]]",
expected_text="type[BuildsWithSig[type[int], (x: int, y: str, z: bool = ...)]]",
)


Expand Down

0 comments on commit 82fd8fb

Please sign in to comment.