Skip to content

Commit

Permalink
Merge pull request #12 from wy-z/wy_develop
Browse files Browse the repository at this point in the history
Refine typing compatibility
  • Loading branch information
wy-z authored Feb 7, 2024
2 parents 97f0e49 + 9d20ca7 commit aff0509
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions requests_openapi/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def load_spec_from_file(file_path):

class Client:
_requestor: Requestor
_server: Server | None
_server: typing.Optional[Server]
_operations: dict[str, typing.Any]
_raw_spec: dict[str, typing.Any]
_spec: openapi.OpenAPI
Expand All @@ -150,8 +150,8 @@ class Client:

def __init__(
self,
requestor: Requestor | None = None,
server: Server | None = None,
requestor: typing.Optional[Requestor] = None,
server: typing.Optional[Server] = None,
req_opts={},
):
self._requestor = requestor or requests.Session()
Expand Down Expand Up @@ -212,7 +212,7 @@ def derefered_raw_spec(self) -> dict:

def _check_derefer_params(
self,
params: list[openapi.Parameter | openapi.Reference],
params: list[typing.Union[openapi.Parameter, openapi.Reference]],
derefered_params_spec: list[dict],
) -> list[openapi.Parameter]:
refs = list(
Expand Down

0 comments on commit aff0509

Please sign in to comment.