Skip to content

Commit

Permalink
fix: fixes typing errors from integration tests for optional parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Omondi committed Oct 18, 2024
1 parent d5ff98e commit caea6f9
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import annotations

from typing import TYPE_CHECKING, Callable, Dict
from typing import TYPE_CHECKING, Callable, Dict, Optional

if TYPE_CHECKING:
from . import Parsable, ParseNode
Expand All @@ -10,7 +10,7 @@ class ParseNodeHelper:

@staticmethod
def merge_deserializers_for_intersection_wrapper(
*targets: Parsable
*targets: Optional[Parsable]
) -> Dict[str, Callable[[ParseNode], None]]:
"""Merges a collection of parsable field deserializers into a single collection.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def write_bytes_value(self, key: Optional[str], value: Optional[bytes]) -> None:

@abstractmethod
def write_object_value(
self, key: Optional[str], value: Optional[U], *additional_values_to_merge: Optional[List[U]]
self, key: Optional[str], value: Optional[U], *additional_values_to_merge: Optional[U]
) -> None:
"""Writes the specified model object to the stream with an optional given key.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def write_collection_of_object_values(
raise Exception("Form serialization does not support collections.")

def write_object_value(
self, key: Optional[str], value: Optional[U], *additional_values_to_merge: Optional[List[U]]
self, key: Optional[str], value: Optional[U], *additional_values_to_merge: Optional[U]
) -> None:
"""Writes the specified model object to the stream with an optional given key.
Args:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ def write_bytes_value(self, key: Optional[str], value: Optional[bytes]) -> None:
self.value = base64_string

def write_object_value(
self, key: Optional[str], value: Optional[U], *additional_values_to_merge: Optional[List[U]]
self, key: Optional[str], value: Optional[U], *additional_values_to_merge: Optional[U]
) -> None:
"""Writes the specified model object to the stream with an optional given key.
Args:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def write_collection_of_object_values(
raise NotImplementedError()

def write_object_value(
self, key: Optional[str], value: Optional[U], *additional_values_to_merge: Optional[List[U]]
self, key: Optional[str], value: Optional[U], *additional_values_to_merge: Optional[U]
) -> None:
"""Writes the specified model object to the stream with an optional given key.
Args:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def write_bytes_value(self, key: Optional[str], value: Optional[bytes]) -> None:
self.write_str_value(key, base64_string)

def write_object_value(
self, key: Optional[str], value: Optional[U], *additional_values_to_merge: Optional[List[U]]
self, key: Optional[str], value: Optional[U], *additional_values_to_merge: Optional[U]
) -> None:
"""Writes the specified model object to the stream with an optional given key.
Args:
Expand Down
1 change: 1 addition & 0 deletions tests/validation/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ build-backend = "poetry.core.masonry.api"
[tool.poetry]
name = "validation-client"
version = "1.3.4"
package-mode = false
description = "Core abstractions for kiota generated libraries in Python"
authors = ["Microsoft <graphtooling+python@microsoft.com>"]
license = "MIT"
Expand Down

0 comments on commit caea6f9

Please sign in to comment.