From 4b8ebbfc65e7736fb4dea8c7bcee16f883a178c7 Mon Sep 17 00:00:00 2001 From: Michiel <918128+mvanderlee@users.noreply.github.com> Date: Wed, 20 Mar 2024 17:49:18 +0100 Subject: [PATCH] Fix style issues. Rebase did not trigger pre-commit. --- marshmallow_dataclass/__init__.py | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/marshmallow_dataclass/__init__.py b/marshmallow_dataclass/__init__.py index 1974699..5af1c83 100644 --- a/marshmallow_dataclass/__init__.py +++ b/marshmallow_dataclass/__init__.py @@ -44,12 +44,11 @@ class User: import warnings from enum import Enum from functools import lru_cache, partial -from typing import Any, Callable, Dict, FrozenSet, List, Mapping -from typing import NewType as typing_NewType from typing import ( Any, Callable, Dict, + FrozenSet, Generic, List, Mapping, @@ -151,7 +150,8 @@ def dataclass( frozen: bool = False, base_schema: Optional[Type[marshmallow.Schema]] = None, cls_frame: Optional[types.FrameType] = None, -) -> Type[_U]: ... +) -> Type[_U]: + ... @overload @@ -164,7 +164,8 @@ def dataclass( frozen: bool = False, base_schema: Optional[Type[marshmallow.Schema]] = None, cls_frame: Optional[types.FrameType] = None, -) -> Callable[[Type[_U]], Type[_U]]: ... +) -> Callable[[Type[_U]], Type[_U]]: + ... # _cls should never be specified by keyword, so start it with an @@ -223,13 +224,15 @@ def decorator(cls: Type[_U], stacklevel: int = 1) -> Type[_U]: @overload -def add_schema(_cls: Type[_U]) -> Type[_U]: ... +def add_schema(_cls: Type[_U]) -> Type[_U]: + ... @overload def add_schema( base_schema: Optional[Type[marshmallow.Schema]] = None, -) -> Callable[[Type[_U]], Type[_U]]: ... +) -> Callable[[Type[_U]], Type[_U]]: + ... @overload @@ -238,7 +241,8 @@ def add_schema( base_schema: Optional[Type[marshmallow.Schema]] = None, cls_frame: Optional[types.FrameType] = None, stacklevel: int = 1, -) -> Type[_U]: ... +) -> Type[_U]: + ... def add_schema(_cls=None, base_schema=None, cls_frame=None, stacklevel=1): @@ -289,7 +293,8 @@ def class_schema( *, globalns: Optional[Dict[str, Any]] = None, localns: Optional[Dict[str, Any]] = None, -) -> Type[marshmallow.Schema]: ... +) -> Type[marshmallow.Schema]: + ... @overload @@ -299,7 +304,8 @@ def class_schema( clazz_frame: Optional[types.FrameType] = None, *, globalns: Optional[Dict[str, Any]] = None, -) -> Type[marshmallow.Schema]: ... +) -> Type[marshmallow.Schema]: + ... def class_schema(