Skip to content

Commit

Permalink
Use classmethod instead of classmethod[Any, Any, Any] (#7979)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr-Pepe committed Nov 6, 2023
1 parent 2867fa4 commit d2abc7b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions pydantic/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
from .fields import ComputedFieldInfo, FieldInfo, ModelPrivateAttr
from .fields import Field as _Field

AnyClassMethod = classmethod[Any, Any, Any]
TupleGenerator = typing.Generator[typing.Tuple[str, Any], None, None]
Model = typing.TypeVar('Model', bound='BaseModel')
# should be `set[int] | set[str] | dict[int, IncEx] | dict[str, IncEx] | None`, but mypy can't cope
Expand Down Expand Up @@ -1324,7 +1323,7 @@ def create_model(
__doc__: str | None = None,
__base__: None = None,
__module__: str = __name__,
__validators__: dict[str, AnyClassMethod] | None = None,
__validators__: dict[str, classmethod] | None = None,
__cls_kwargs__: dict[str, Any] | None = None,
**field_definitions: Any,
) -> type[BaseModel]:
Expand All @@ -1339,7 +1338,7 @@ def create_model(
__doc__: str | None = None,
__base__: type[Model] | tuple[type[Model], ...],
__module__: str = __name__,
__validators__: dict[str, AnyClassMethod] | None = None,
__validators__: dict[str, classmethod] | None = None,
__cls_kwargs__: dict[str, Any] | None = None,
**field_definitions: Any,
) -> type[Model]:
Expand All @@ -1353,7 +1352,7 @@ def create_model( # noqa: C901
__doc__: str | None = None,
__base__: type[Model] | tuple[type[Model], ...] | None = None,
__module__: str | None = None,
__validators__: dict[str, AnyClassMethod] | None = None,
__validators__: dict[str, classmethod] | None = None,
__cls_kwargs__: dict[str, Any] | None = None,
__slots__: tuple[str, ...] | None = None,
**field_definitions: Any,
Expand Down

0 comments on commit d2abc7b

Please sign in to comment.