Skip to content

Commit

Permalink
Fix linting and format issues
Browse files Browse the repository at this point in the history
  • Loading branch information
samwelkanda committed Apr 14, 2022
1 parent 4bdca45 commit 30cb74f
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from .additional_data_holder import AdditionalDataHolder
from .parsable import Parsable
from .parsable_factory import ParsableFactory
from .parse_node import ParseNode
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

from .parsable import Parsable


T = TypeVar("T")

U = TypeVar("U", bound=Parsable)
Expand All @@ -19,6 +18,7 @@
if TYPE_CHECKING:
from .parsable_factory import ParsableFactory


class ParseNode(ABC):
"""
Interface for a deserialization node in a parse tree. This interace provides an abstraction
Expand Down
16 changes: 6 additions & 10 deletions http/python/requests/http_requests/requests_request_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,13 @@ def get_response_content_type(self, response: requests.Response) -> Optional[str

async def send_async(
self, request_info: RequestInformation, model_type: ParsableFactory,
response_handler: Optional[ResponseHandler],
error_map: Dict[str, ParsableFactory]
response_handler: Optional[ResponseHandler], error_map: Dict[str, ParsableFactory]
) -> ModelType:
"""Excutes the HTTP request specified by the given RequestInformation and returns the
deserialized response model.
Args:
request_info (RequestInformation): the request info to execute.
type (ParsableFactory): the class of the response model to deserialize the response into.
type (ParsableFactory): the class of the response model to deserialize the response into
response_handler (Optional[ResponseHandler]): The response handler to use for the HTTP
request instead of the default handler.
error_map (Dict[str, ParsableFactory]): the error dict to use in
Expand All @@ -124,14 +123,13 @@ async def send_async(

async def send_collection_async(
self, request_info: RequestInformation, model_type: ParsableFactory,
response_handler: Optional[ResponseHandler],
error_map: Dict[str, ParsableFactory]
response_handler: Optional[ResponseHandler], error_map: Dict[str, ParsableFactory]
) -> List[ModelType]:
"""Excutes the HTTP request specified by the given RequestInformation and returns the
deserialized response model collection.
Args:
request_info (RequestInformation): the request info to execute.
type (ParsableFactory): the class of the response model to deserialize the response into.
type (ParsableFactory): the class of the response model to deserialize the response into
response_handler (Optional[ResponseHandler]): The response handler to use for the
HTTP request instead of the default handler.
error_map (Dict[str, ParsableFactory]): the error dict to use in
Expand All @@ -155,8 +153,7 @@ async def send_collection_async(

async def send_collection_of_primitive_async(
self, request_info: RequestInformation, response_type: ResponseType,
response_handler: Optional[ResponseHandler],
error_map: Dict[str, ParsableFactory]
response_handler: Optional[ResponseHandler], error_map: Dict[str, ParsableFactory]
) -> Optional[List[ResponseType]]:
"""Excutes the HTTP request specified by the given RequestInformation and returns the
deserialized response model collection.
Expand Down Expand Up @@ -186,8 +183,7 @@ async def send_collection_of_primitive_async(

async def send_primitive_async(
self, request_info: RequestInformation, response_type: ResponseType,
response_handler: Optional[ResponseHandler],
error_map: Dict[str, ParsableFactory]
response_handler: Optional[ResponseHandler], error_map: Dict[str, ParsableFactory]
) -> ResponseType:
"""Excutes the HTTP request specified by the given RequestInformation and returns the
deserialized primitive response model.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,12 @@
from uuid import UUID

from dateutil import parser

from kiota.abstractions.serialization import AdditionalDataHolder, Parsable, ParsableFactory, ParseNode
from kiota.abstractions.serialization import (
AdditionalDataHolder,
Parsable,
ParsableFactory,
ParseNode,
)

T = TypeVar("T")

Expand Down Expand Up @@ -272,4 +276,3 @@ def _assign_field_values(self, item: U) -> None:
else:
if item_additional_data:
item_additional_data[snake_case_key] = val

0 comments on commit 30cb74f

Please sign in to comment.