Skip to content

Commit d3f3493

Browse files
committed
Fix pylint errors
1 parent ef8cf63 commit d3f3493

File tree

6 files changed

+14
-8
lines changed

6 files changed

+14
-8
lines changed

src/msgraph_core/graph_client_factory.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ class GraphClientFactory(KiotaClientFactory):
2222
"""
2323

2424
@staticmethod
25-
def create_with_default_middleware( # type: ignore # Breaking change to remove KiotaClientFactory as base class
25+
def create_with_default_middleware( # type: ignore
26+
# Breaking change to remove KiotaClientFactory as base class
2627
api_version: APIVersion = APIVersion.v1,
2728
client: Optional[httpx.AsyncClient] = None,
2829
host: NationalClouds = NationalClouds.Global,
@@ -53,7 +54,8 @@ def create_with_default_middleware( # type: ignore # Breaking change to remove K
5354
return GraphClientFactory._load_middleware_to_client(client, middleware)
5455

5556
@staticmethod
56-
def create_with_custom_middleware( # type: ignore # Breaking change to remove Kiota client factory as base class
57+
def create_with_custom_middleware( # type: ignore
58+
# Breaking change to remove Kiota client factory as base class
5759
middleware: Optional[List[BaseMiddleware]],
5860
api_version: APIVersion = APIVersion.v1,
5961
client: Optional[httpx.AsyncClient] = None,

src/msgraph_core/models/page_result.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ def get_field_deserializers(self) -> Dict[str, Callable[[ParseNode], None]]:
5353
self,
5454
"value",
5555
x.get_collection_of_object_values(
56-
Parsable # type: ignore # Bug. Should get a collection of primitive dictionary objects
56+
Parsable # type: ignore
57+
# Bug. Should get a collection of primitive dictionary objects
5758
)
5859
)
5960
}

src/msgraph_core/requests/batch_request_content.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
import uuid
22
from typing import List, Dict, Union, Optional
3+
from urllib.request import Request
34

45
from kiota_abstractions.request_information import RequestInformation
56
from kiota_abstractions.serialization import Parsable, ParseNode
67
from kiota_abstractions.serialization import SerializationWriter
78

8-
from urllib.request import Request
9-
109
from .batch_request_item import BatchRequestItem
1110

1211

@@ -68,7 +67,9 @@ def add_request(self, request_id: Optional[str], request: BatchRequestItem) -> N
6867
for dependent_id in request.depends_on:
6968
if not self._request_by_id(dependent_id):
7069
raise ValueError(
71-
f"Request depends on request id: {dependent_id} which was not found in requests. Add request id: {dependent_id} first"
70+
f"""
71+
Request depends on request id: {dependent_id}
72+
which was not found in requests. Add request id: {dependent_id} first"""
7273
)
7374
self._requests[request.id] = request
7475

src/msgraph_core/requests/batch_request_item.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,8 @@ def serialize(self, writer: SerializationWriter) -> None:
267267
is_json_string = json_object and isinstance(json_object, dict)
268268
# /$batch API expects JSON object or base 64 encoded value for the body
269269
if is_json_string:
270-
writer.write_collection_of_object_values( # type: ignore # need method to serialize dicts
270+
writer.write_collection_of_object_values( # type: ignore
271+
# need method to serialize dicts
271272
'body',
272273
json_object
273274
)

src/msgraph_core/tasks/large_file_upload.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ async def upload(self, after_chunk_upload: Optional[Callable] = None):
113113
lfu_session = session
114114
if lfu_session is None:
115115
continue
116+
next_range = None
116117
if hasattr(lfu_session, 'next_expected_ranges'):
117118
next_range = lfu_session.next_expected_ranges
118119
old_url = self.get_validated_upload_url(self.upload_session)

src/msgraph_core/tasks/page_iterator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def __init__(
9090
if page is not None:
9191
self.current_page = page
9292
self.has_next = bool(page.odata_next_link)
93-
self.error_mapping = error_mapping if error_mapping else dict()
93+
self.error_mapping = error_mapping if error_mapping else {}
9494

9595
def set_headers(self, headers: dict) -> HeadersCollection:
9696
"""

0 commit comments

Comments
 (0)