Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions sdk/terraform/azure-mgmt-terraform/_meta.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"commit": "ed3e7186654df4ec286c3d92f03dfa6c14b37279",
"commit": "7bd3011537fa5957c18765c3d7fbe6da2021873c",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"typespec_src": "specification/terraform/Microsoft.AzureTerraform.Management",
"@azure-tools/typespec-python": "0.36.1"
"@azure-tools/typespec-python": "0.36.5"
}
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,7 @@ def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-retur
except AttributeError:
model_name = annotation
if module is not None:
annotation = _get_model(module, model_name)
annotation = _get_model(module, model_name) # type: ignore

try:
if module and _is_model(annotation):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1683,17 +1683,21 @@ def _instantiate_model(self, response, attrs, additional_properties=None):
subtype = getattr(response, "_subtype_map", {})
try:
readonly = [
k for k, v in response._validation.items() if v.get("readonly") # pylint: disable=protected-access
k
for k, v in response._validation.items() # pylint: disable=protected-access # type: ignore
if v.get("readonly")
]
const = [
k for k, v in response._validation.items() if v.get("constant") # pylint: disable=protected-access
k
for k, v in response._validation.items() # pylint: disable=protected-access # type: ignore
if v.get("constant")
]
kwargs = {k: v for k, v in attrs.items() if k not in subtype and k not in readonly + const}
response_obj = response(**kwargs)
for attr in readonly:
setattr(response_obj, attr, attrs.get(attr))
if additional_properties:
response_obj.additional_properties = additional_properties
response_obj.additional_properties = additional_properties # type: ignore
return response_obj
except TypeError as err:
msg = "Unable to deserialize {} into model {}. ".format(kwargs, response) # type: ignore
Expand Down
8 changes: 3 additions & 5 deletions sdk/terraform/azure-mgmt-terraform/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,9 @@

# Version extraction inspired from 'requests'
with open(
(
os.path.join(package_folder_path, "version.py")
if os.path.exists(os.path.join(package_folder_path, "version.py"))
else os.path.join(package_folder_path, "_version.py")
),
os.path.join(package_folder_path, "version.py")
if os.path.exists(os.path.join(package_folder_path, "version.py"))
else os.path.join(package_folder_path, "_version.py"),
"r",
) as fd:
version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1)
Expand Down
2 changes: 1 addition & 1 deletion sdk/terraform/azure-mgmt-terraform/tsp-location.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
directory: specification/terraform/Microsoft.AzureTerraform.Management
commit: ed3e7186654df4ec286c3d92f03dfa6c14b37279
commit: 7bd3011537fa5957c18765c3d7fbe6da2021873c
repo: Azure/azure-rest-api-specs
additionalDirectories:
Loading