@autorest/python 6.24.0 → 6.26.0

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.
@@ -0,0 +1 @@
1
+ recursive-include pygen/codegen/templates *.jinja2
@@ -4,7 +4,7 @@
4
4
  {% set async_class = "Async" if async_mode else "" %}
5
5
  {% macro escape_str(s) %}'{{ s|replace("'", "\\'") }}'{% endmacro %}
6
6
  {% set kwargs_declaration = "**kwargs: Any" %}
7
- {% set extend_all = "__all__.extend([p for p in _patch_all if p not in __all__])" %}
7
+ {% set extend_all = "__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore" %}
8
8
  {% macro patch_imports(try_except=False) %}
9
9
  {% set indentation = " " if try_except else "" %}
10
10
  {% if try_except %}
@@ -16,4 +16,4 @@ try:
16
16
  except ImportError:
17
17
  _patch_all = []
18
18
  {% endif %}
19
- from ._patch import patch_sdk as _patch_sdk{% endmacro %}
19
+ from ._patch import patch_sdk as _patch_sdk{% endmacro %}
@@ -57,11 +57,11 @@
57
57
  {% for param_signature in serializer.init_line(model) %}
58
58
  {{ param_signature }}
59
59
  {% endfor %}
60
- ):
60
+ ) -> None:
61
61
  ...
62
62
 
63
63
  @overload
64
- def __init__(self, mapping: Mapping[str, Any]):
64
+ def __init__(self, mapping: Mapping[str, Any]) -> None:
65
65
  """
66
66
  :param mapping: raw JSON to initialize the model.
67
67
  :type mapping: Mapping[str, Any]
@@ -226,7 +226,7 @@ except ImportError: # Python 2.7
226
226
  :param datetime.timedelta offset: offset in timedelta format
227
227
  """
228
228
 
229
- def __init__(self, offset):
229
+ def __init__(self, offset) -> None:
230
230
  self.__offset = offset
231
231
 
232
232
  def utcoffset(self, dt):
@@ -598,7 +598,7 @@ class Serializer(object): # pylint: disable=too-many-public-methods
598
598
  "multiple": lambda x, y: x % y != 0,
599
599
  }
600
600
 
601
- def __init__(self, classes: Optional[Mapping[str, type]] = None):
601
+ def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None:
602
602
  self.serialize_type = {
603
603
  "iso-8601": Serializer.serialize_iso,
604
604
  "rfc-1123": Serializer.serialize_rfc,
@@ -1452,7 +1452,7 @@ class Deserializer(object):
1452
1452
 
1453
1453
  valid_date = re.compile(r"\d{4}[-]\d{2}[-]\d{2}T\d{2}:\d{2}:\d{2}\.?\d*Z?[-+]?[\d{2}]?:?[\d{2}]?")
1454
1454
 
1455
- def __init__(self, classes: Optional[Mapping[str, type]] = None):
1455
+ def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None:
1456
1456
  self.deserialize_type = {
1457
1457
  "iso-8601": Deserializer.deserialize_iso,
1458
1458
  "rfc-1123": Deserializer.deserialize_rfc,
@@ -1,4 +1,5 @@
1
1
  LICENSE
2
+ MANIFEST.in
2
3
  README.md
3
4
  setup.py
4
5
  pygen/__init__.py
@@ -58,6 +59,49 @@ pygen/codegen/serializers/sample_serializer.py
58
59
  pygen/codegen/serializers/test_serializer.py
59
60
  pygen/codegen/serializers/types_serializer.py
60
61
  pygen/codegen/serializers/utils.py
62
+ pygen/codegen/templates/client.py.jinja2
63
+ pygen/codegen/templates/client_container.py.jinja2
64
+ pygen/codegen/templates/config.py.jinja2
65
+ pygen/codegen/templates/config_container.py.jinja2
66
+ pygen/codegen/templates/conftest.py.jinja2
67
+ pygen/codegen/templates/enum.py.jinja2
68
+ pygen/codegen/templates/enum_container.py.jinja2
69
+ pygen/codegen/templates/init.py.jinja2
70
+ pygen/codegen/templates/keywords.jinja2
71
+ pygen/codegen/templates/lro_operation.py.jinja2
72
+ pygen/codegen/templates/lro_paging_operation.py.jinja2
73
+ pygen/codegen/templates/macros.jinja2
74
+ pygen/codegen/templates/metadata.json.jinja2
75
+ pygen/codegen/templates/model_base.py.jinja2
76
+ pygen/codegen/templates/model_container.py.jinja2
77
+ pygen/codegen/templates/model_dpg.py.jinja2
78
+ pygen/codegen/templates/model_init.py.jinja2
79
+ pygen/codegen/templates/model_msrest.py.jinja2
80
+ pygen/codegen/templates/operation.py.jinja2
81
+ pygen/codegen/templates/operation_group.py.jinja2
82
+ pygen/codegen/templates/operation_groups_container.py.jinja2
83
+ pygen/codegen/templates/operation_tools.jinja2
84
+ pygen/codegen/templates/operations_folder_init.py.jinja2
85
+ pygen/codegen/templates/paging_operation.py.jinja2
86
+ pygen/codegen/templates/patch.py.jinja2
87
+ pygen/codegen/templates/pkgutil_init.py.jinja2
88
+ pygen/codegen/templates/request_builder.py.jinja2
89
+ pygen/codegen/templates/request_builders.py.jinja2
90
+ pygen/codegen/templates/rest_init.py.jinja2
91
+ pygen/codegen/templates/sample.py.jinja2
92
+ pygen/codegen/templates/serialization.py.jinja2
93
+ pygen/codegen/templates/test.py.jinja2
94
+ pygen/codegen/templates/testpreparer.py.jinja2
95
+ pygen/codegen/templates/types.py.jinja2
96
+ pygen/codegen/templates/validation.py.jinja2
97
+ pygen/codegen/templates/vendor.py.jinja2
98
+ pygen/codegen/templates/version.py.jinja2
99
+ pygen/codegen/templates/packaging_templates/CHANGELOG.md.jinja2
100
+ pygen/codegen/templates/packaging_templates/LICENSE.jinja2
101
+ pygen/codegen/templates/packaging_templates/MANIFEST.in.jinja2
102
+ pygen/codegen/templates/packaging_templates/README.md.jinja2
103
+ pygen/codegen/templates/packaging_templates/dev_requirements.txt.jinja2
104
+ pygen/codegen/templates/packaging_templates/setup.py.jinja2
61
105
  pygen/postprocess/__init__.py
62
106
  pygen/postprocess/get_all.py
63
107
  pygen/postprocess/venvtools.py
@@ -23,6 +23,7 @@ if not version:
23
23
  setup(
24
24
  name="pygen",
25
25
  version=version,
26
+ include_package_data=True,
26
27
  description="Core Library for Python Generation",
27
28
  long_description=open("README.md", "r").read(),
28
29
  long_description_content_type="text/markdown",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autorest/python",
3
- "version": "6.24.0",
3
+ "version": "6.26.0",
4
4
  "description": "The Python extension for generators in AutoRest.",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -25,7 +25,7 @@
25
25
  },
26
26
  "devDependencies": {
27
27
  "@microsoft.azure/autorest.testserver": "^3.3.50",
28
- "@typespec/http-client-python": "0.2.0",
28
+ "@typespec/http-client-python": "0.3.0",
29
29
  "chalk": "5.3.0",
30
30
  "typescript": "~5.1.6"
31
31
  },