Skip to content

Commit

Permalink
Revert new type annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
karpetrosyan committed Jul 19, 2023
1 parent b9188d1 commit 2f84f2a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions hishel/_serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def is_binary(self) -> bool:
class YamlSerializer(BaseSerializer):


def dumps(self, response: Response) -> str | bytes:
def dumps(self, response: Response) -> tp.Union[str, bytes]:
response_dict = {
"status": response.status,
"headers": [
Expand All @@ -97,7 +97,7 @@ def dumps(self, response: Response) -> str | bytes:
}
return yaml.safe_dump(response_dict, sort_keys=False)

def loads(self, data: str | bytes) -> Response:
def loads(self, data: tp.Union[str, bytes]) -> Response:
response_dict = yaml.safe_load(data)

return Response(
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ check_untyped_defs = true
[tool.pytest.ini_options]
addopts = ["-rxXs", "--strict-config", "--strict-markers"]
markers = ["copied_from(source, changes=None): mark test as copied from somewhere else, along with a description of changes made to accodomate e.g. our test setup"]
filterwarnings = ["error"]
filterwarnings = []

[tool.coverage.run]
omit = [
Expand Down

0 comments on commit 2f84f2a

Please sign in to comment.