Skip to content

Commit

Permalink
typing - …
Browse files Browse the repository at this point in the history
  • Loading branch information
commonism committed Dec 26, 2022
1 parent f905358 commit 36e50a3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions aiopenapi3/openapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -523,13 +523,12 @@ def _load(self, url: yarl.URL):
def _(self):
return self._operationindex

def createRequest(self, operationId: Union[str, Tuple[str, str]]):
def createRequest(self, operationId: Union[str, Tuple[str, str]]) -> aiopenapi3.request.RequestBase:
"""
create a Request
lookup the Operation by operationId or path,method
:param operationId:
:return: aiopenapi3.request.RequestBase
"""
if isinstance(operationId, str):
p = operationId.split(".")
Expand Down
2 changes: 1 addition & 1 deletion aiopenapi3/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def __init__(self, api: "OpenAPI", method: str, path: str, operation: "Operation
self.operation = operation
self.req: RequestParameter = RequestParameter(self.path)

def __call__(self, *args, return_headers: bool = False, **kwargs):
def __call__(self, *args, return_headers: bool = False, **kwargs) -> Union[Any, Tuple[Dict[str, str], Any]]:
"""
:param args:
:param return_headers: if set return a tuple (header, body)
Expand Down

0 comments on commit 36e50a3

Please sign in to comment.