Skip to content

Commit

Permalink
Format code
Browse files Browse the repository at this point in the history
  • Loading branch information
binste committed Aug 6, 2023
1 parent 52c96a4 commit f83caa5
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 14 deletions.
17 changes: 10 additions & 7 deletions altair/utils/schemapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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):
Expand Down
17 changes: 10 additions & 7 deletions tools/schemapi/schemapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit f83caa5

Please sign in to comment.