@typespec/http-client-python 0.3.8 → 0.3.10

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.
@@ -1,8 +1,8 @@
1
1
  -e ./generator
2
- pyright==1.1.375
2
+ pyright==1.1.389
3
3
  pylint==3.2.7
4
4
  tox==4.16.0
5
- mypy==1.10.1
5
+ mypy==1.13.0
6
6
  azure-pylint-guidelines-checker==0.0.8
7
7
  colorama==0.4.6
8
8
  debugpy==1.8.2
@@ -340,7 +340,7 @@ class StringType(PrimitiveType):
340
340
  return validation or None
341
341
 
342
342
  def get_declaration(self, value) -> str:
343
- return f'"{value}"'
343
+ return f"'{value}'" if value == '"' else f'"{value}"'
344
344
 
345
345
  @property
346
346
  def serialization_type(self) -> str:
@@ -752,7 +752,7 @@ def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-retur
752
752
  except AttributeError:
753
753
  model_name = annotation
754
754
  if module is not None:
755
- annotation = _get_model(module, model_name)
755
+ annotation = _get_model(module, model_name) # type: ignore
756
756
 
757
757
  try:
758
758
  if module and _is_model(annotation):
@@ -1682,17 +1682,21 @@ class Deserializer(object):
1682
1682
  subtype = getattr(response, "_subtype_map", {})
1683
1683
  try:
1684
1684
  readonly = [
1685
- k for k, v in response._validation.items() if v.get("readonly") # pylint: disable=protected-access
1685
+ k
1686
+ for k, v in response._validation.items() # pylint: disable=protected-access # type: ignore
1687
+ if v.get("readonly")
1686
1688
  ]
1687
1689
  const = [
1688
- k for k, v in response._validation.items() if v.get("constant") # pylint: disable=protected-access
1690
+ k
1691
+ for k, v in response._validation.items() # pylint: disable=protected-access # type: ignore
1692
+ if v.get("constant")
1689
1693
  ]
1690
1694
  kwargs = {k: v for k, v in attrs.items() if k not in subtype and k not in readonly + const}
1691
1695
  response_obj = response(**kwargs)
1692
1696
  for attr in readonly:
1693
1697
  setattr(response_obj, attr, attrs.get(attr))
1694
1698
  if additional_properties:
1695
- response_obj.additional_properties = additional_properties
1699
+ response_obj.additional_properties = additional_properties # type: ignore
1696
1700
  return response_obj
1697
1701
  except TypeError as err:
1698
1702
  msg = "Unable to deserialize {} into model {}. ".format(kwargs, response) # type: ignore
@@ -4,10 +4,10 @@ pytest
4
4
  pytest-asyncio==0.14.0;python_full_version>="3.5.2"
5
5
  azure-core==1.30.0
6
6
  azure-mgmt-core==1.3.2
7
- pyright==1.1.379
7
+ pyright==1.1.389
8
8
  pylint==3.2.7
9
9
  tox==4.18.1
10
- mypy==1.10.1
10
+ mypy==1.13.0
11
11
 
12
12
  # only for azure
13
13
  -e ./generated/azure-client-generator-core-access
@@ -2,10 +2,10 @@ aiohttp;python_full_version>="3.5.2"
2
2
  requests==2.32.2
3
3
  pytest
4
4
  pytest-asyncio==0.14.0;python_full_version>="3.5.2"
5
- pyright==1.1.379
5
+ pyright==1.1.389
6
6
  pylint==3.2.7
7
7
  tox==4.18.1
8
- mypy==1.10.1
8
+ mypy==1.13.0
9
9
 
10
10
 
11
11
  # common test case
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@typespec/http-client-python",
3
- "version": "0.3.8",
3
+ "version": "0.3.10",
4
4
  "author": "Microsoft Corporation",
5
5
  "description": "TypeSpec emitter for Python SDKs",
6
6
  "homepage": "https://typespec.io",