@autorest/python 6.3.1 → 6.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -473,7 +473,7 @@ class Model(_MyMutableMapping):
|
|
|
473
473
|
|
|
474
474
|
|
|
475
475
|
def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-statements
|
|
476
|
-
annotation: typing.Any, module: typing.Optional[str], rf: "_RestField" = None
|
|
476
|
+
annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None
|
|
477
477
|
) -> typing.Optional[typing.Callable[[typing.Any], typing.Any]]:
|
|
478
478
|
if not annotation or annotation in [int, float]:
|
|
479
479
|
return None
|
|
@@ -624,8 +624,8 @@ def _deserialize_with_callable(deserializer: typing.Optional[typing.Callable[[ty
|
|
|
624
624
|
# for unknown value, return raw value
|
|
625
625
|
return value
|
|
626
626
|
if isinstance(deserializer, type) and issubclass(deserializer, Model):
|
|
627
|
-
return deserializer._deserialize(value)
|
|
628
|
-
return deserializer(value)
|
|
627
|
+
return deserializer._deserialize(value)
|
|
628
|
+
return typing.cast(typing.Callable[[typing.Any], typing.Any], deserializer)(value)
|
|
629
629
|
except Exception as e:
|
|
630
630
|
raise DeserializationError() from e
|
|
631
631
|
|
|
@@ -178,9 +178,9 @@ def update_parameter(yaml_data: Dict[str, Any]) -> None:
|
|
|
178
178
|
if yaml_data.get("propertyToParameterName"):
|
|
179
179
|
# need to create a new one with padded keys and values
|
|
180
180
|
yaml_data["propertyToParameterName"] = {
|
|
181
|
-
pad_reserved_words(prop, PadType.PROPERTY)
|
|
182
|
-
|
|
183
|
-
)
|
|
181
|
+
pad_reserved_words(prop, PadType.PROPERTY)
|
|
182
|
+
.lower(): pad_reserved_words(param_name, PadType.PARAMETER)
|
|
183
|
+
.lower()
|
|
184
184
|
for prop, param_name in yaml_data["propertyToParameterName"].items()
|
|
185
185
|
}
|
|
186
186
|
|
package/package.json
CHANGED