From f83caa5ecf1c3c873104838075828f8c07e5805e Mon Sep 17 00:00:00 2001 From: Stefan Binder Date: Sun, 6 Aug 2023 16:58:29 +0200 Subject: [PATCH] Format code --- altair/utils/schemapi.py | 17 ++++++++++------- tools/schemapi/schemapi.py | 17 ++++++++++------- 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/altair/utils/schemapi.py b/altair/utils/schemapi.py index aa96d948c..6ead5020e 100644 --- a/altair/utils/schemapi.py +++ b/altair/utils/schemapi.py @@ -925,8 +925,8 @@ def from_dict( dct: dict, validate: bool = True, _wrapper_classes: Optional[Iterable[Type["SchemaBase"]]] = None, - # Type hints for this method would get rather complicated - # if we want to provide a more specific return type + # Type hints for this method would get rather complicated + # if we want to provide a more specific return type ) -> Any: """Construct class from a dictionary representation @@ -960,9 +960,12 @@ def from_dict( @classmethod def from_json( - cls, json_string: str, validate: bool = True, **kwargs: Any - # Type hints for this method would get rather complicated - # if we want to provide a more specific return type + cls, + json_string: str, + validate: bool = True, + **kwargs: Any + # Type hints for this method would get rather complicated + # if we want to provide a more specific return type ) -> Any: """Instantiate the object from a valid JSON string @@ -1093,8 +1096,8 @@ def from_dict( schema: Optional[dict] = None, rootschema: Optional[dict] = None, default_class=_passthrough, - # Type hints for this method would get rather complicated - # if we want to provide a more specific return type + # Type hints for this method would get rather complicated + # if we want to provide a more specific return type ) -> Any: """Construct an object from a dict representation""" if (schema is None) == (cls is None): diff --git a/tools/schemapi/schemapi.py b/tools/schemapi/schemapi.py index 1b7ae9edb..0dc9ac89e 100644 --- a/tools/schemapi/schemapi.py +++ b/tools/schemapi/schemapi.py @@ -923,8 +923,8 @@ def from_dict( dct: dict, validate: bool = True, _wrapper_classes: Optional[Iterable[Type["SchemaBase"]]] = None, - # Type hints for this method would get rather complicated - # if we want to provide a more specific return type + # Type hints for this method would get rather complicated + # if we want to provide a more specific return type ) -> Any: """Construct class from a dictionary representation @@ -958,9 +958,12 @@ def from_dict( @classmethod def from_json( - cls, json_string: str, validate: bool = True, **kwargs: Any - # Type hints for this method would get rather complicated - # if we want to provide a more specific return type + cls, + json_string: str, + validate: bool = True, + **kwargs: Any + # Type hints for this method would get rather complicated + # if we want to provide a more specific return type ) -> Any: """Instantiate the object from a valid JSON string @@ -1091,8 +1094,8 @@ def from_dict( schema: Optional[dict] = None, rootschema: Optional[dict] = None, default_class=_passthrough, - # Type hints for this method would get rather complicated - # if we want to provide a more specific return type + # Type hints for this method would get rather complicated + # if we want to provide a more specific return type ) -> Any: """Construct an object from a dict representation""" if (schema is None) == (cls is None):