Skip to content

Commit

Permalink
[http-client-python] bump pyright version to latest (#5121)
Browse files Browse the repository at this point in the history
  • Loading branch information
kristapratico authored Nov 15, 2024
1 parent 2de0103 commit e146246
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/http-client-python/generator/dev_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-e ./generator
pyright==1.1.375
pyright==1.1.389
pylint==3.2.7
tox==4.16.0
mypy==1.13.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,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 @@ -1682,17 +1682,21 @@ class Deserializer(object):
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
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pytest
pytest-asyncio==0.14.0;python_full_version>="3.5.2"
azure-core==1.30.0
azure-mgmt-core==1.3.2
pyright==1.1.379
pyright==1.1.389
pylint==3.2.7
tox==4.18.1
mypy==1.13.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ aiohttp;python_full_version>="3.5.2"
requests==2.32.2
pytest
pytest-asyncio==0.14.0;python_full_version>="3.5.2"
pyright==1.1.379
pyright==1.1.389
pylint==3.2.7
tox==4.18.1
mypy==1.13.0
Expand Down

0 comments on commit e146246

Please sign in to comment.