Skip to content

Commit

Permalink
Remove type hints
Browse files Browse the repository at this point in the history
Signed-off-by: Ching Yi, Chan <qrtt1@infuseai.io>
  • Loading branch information
qrtt1 committed Nov 7, 2023
1 parent 3a0d8aa commit 4a871e6
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions piperider_cli/yaml/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
from pathlib import Path
from typing import Any, Callable, Optional, Union
from typing import Any, Callable

from ruamel import yaml
from ruamel.yaml import StreamTextType, StreamType, VersionType
from ruamel.yaml import CommentedMap as _cm, CommentedSeq as _cs

_yaml = yaml.YAML()
Expand All @@ -12,7 +10,7 @@
YAMLError = yaml.YAMLError


def load(stream: Union[Path, StreamTextType]) -> Any:
def load(stream) -> Any:
return _yaml.load(stream)


Expand All @@ -22,12 +20,12 @@ def allow_duplicate_keys_loader() -> Callable:
return yml.load


def safe_load(stream: StreamTextType, version: Optional[VersionType] = None) -> Any:
def safe_load(stream, version=None) -> Any:
return yaml.safe_load(stream, version)


def dump(
data: Union[Path, StreamType], stream: Any = None, *, transform: Any = None
data, stream: Any = None, *, transform: Any = None
) -> Any:
return _yaml.dump(data, stream, transform=transform)

Expand Down Expand Up @@ -56,5 +54,5 @@ def round_trip_load_yaml(file_path):

def round_trip_dump(
data: Any,
stream: Optional[StreamType] = None):
stream=None):
return yaml.round_trip_dump(data, stream)

0 comments on commit 4a871e6

Please sign in to comment.