Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
brentyi committed Jan 16, 2025
1 parent 37c786f commit 87d065a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 0 additions & 2 deletions tests/test_generics_and_serialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -574,8 +574,6 @@ def spam(self, model: TContainsAModel) -> TContainsAModel:
self.model = model
return model

model: TContainsAModel

class ABHelper(AHelper[ABModel]):
def print_model(self) -> None:
print(self.model.config)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,9 @@ def c(model: ABModel[ABCConfig]):


def test_simple_bound_method() -> None:
class Config[T]:
T = TypeVar("T")

class Config(Generic[T]):
def __init__(self, a: T) -> None: ...
def method(self, a: T) -> T:
return a
Expand All @@ -556,8 +558,6 @@ class AModel(Generic[TContainsAConfig]):
def __init__(self, config: TContainsAConfig):
self.config = config

config: TContainsAConfig

TContainsAModel = TypeVar("TContainsAModel", bound=AModel)

@dataclasses.dataclass
Expand All @@ -572,8 +572,6 @@ def spam(self, model: TContainsAModel) -> TContainsAModel:
self.model = model
return model

model: TContainsAModel

class ABHelper(AHelper[ABModel]):
def print_model(self) -> None:
print(self.model.config)
Expand Down

0 comments on commit 87d065a

Please # to comment.