Skip to content

Commit 8d0dd49

Browse files
authored
Merge pull request #91 from DavidCEllis/slight-typing-issue
from_field should return typing.Self not Field
2 parents 7fa1e84 + bc5ddb5 commit 8d0dd49

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/ducktools/classbuilder/__init__.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ class Field(metaclass=SlotMakerMeta):
215215
def __eq__(self, other: Field | object) -> bool: ...
216216
def validate_field(self) -> None: ...
217217
@classmethod
218-
def from_field(cls, fld: Field, /, **kwargs: typing.Any) -> Field: ...
218+
def from_field(cls, fld: Field, /, **kwargs: typing.Any) -> typing.Self: ...
219219

220220
# These types only exist because type[Field] doesn't seem to resolve correctly
221221
# Technically they're wrong as `isinstance` gets used

0 commit comments

Comments
 (0)