@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) # type: ignore
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): pad_reserved_words(
182
- param_name, PadType.PARAMETER
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autorest/python",
3
- "version": "6.3.1",
3
+ "version": "6.3.2",
4
4
  "description": "The Python extension for generators in AutoRest.",
5
5
  "main": "index.js",
6
6
  "repository": {
package/requirements.txt CHANGED
@@ -6,7 +6,6 @@ json-rpc==1.14.0
6
6
  m2r2==0.3.3
7
7
  MarkupSafe==2.1.2
8
8
  mistune==0.8.4
9
- mypy-extensions==0.4.3
10
9
  pathspec==0.10.3
11
10
  platformdirs==2.6.2
12
11
  PyYAML==6.0