Skip to content

Commit

Permalink
pip prod(deps): bump pylint from 3.1.0 to 3.2.5 in /eng (#2666)
Browse files Browse the repository at this point in the history
* pip prod(deps): bump pylint from 3.1.0 to 3.2.5 in /eng

Bumps [pylint](https://github.com/pylint-dev/pylint) from 3.1.0 to 3.2.5.
- [Release notes](https://github.com/pylint-dev/pylint/releases)
- [Commits](pylint-dev/pylint@v3.1.0...v3.2.5)

---
updated-dependencies:
- dependency-name: pylint
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* code

* inv

* changelog

* review

* inv

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com>
Co-authored-by: Yuchao Yan <yuchaoyan@microsoft.com>
  • Loading branch information
3 people authored Jul 24, 2024
1 parent db8bda9 commit 15cba4d
Show file tree
Hide file tree
Showing 225 changed files with 445 additions and 10,698 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
changeKind: internal
packages:
- "@autorest/python"
- "@azure-tools/typespec-python"
---

Internal optimization to avoid lint error reported by new pylint
2 changes: 1 addition & 1 deletion eng/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This is for CI requirements or dev only
pyright==1.1.371
pylint==3.1.0
pylint==3.2.5
tox==4.16.0
mypy==1.10.1
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,7 @@ def _basic_polling_initial(
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response)

if response.status_code == 200:
deserialized = response.iter_bytes()

if response.status_code == 204:
deserialized = response.iter_bytes()
deserialized = response.iter_bytes()

if cls:
return cls(pipeline_response, cast(Iterator[bytes], deserialized), {}) # type: ignore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,7 @@ async def _basic_polling_initial(
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response)

if response.status_code == 200:
deserialized = response.iter_bytes()

if response.status_code == 204:
deserialized = response.iter_bytes()
deserialized = response.iter_bytes()

if cls:
return cls(pipeline_response, cast(AsyncIterator[bytes], deserialized), {}) # type: ignore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,7 @@ async def _test_lro_initial(
error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

if response.status_code == 200:
deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)

if response.status_code == 204:
deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)
deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)

if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,11 +241,7 @@ def _test_lro_initial(
error = self._deserialize.failsafe_deserialize(_models.Error, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

if response.status_code == 200:
deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)

if response.status_code == 204:
deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)
deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)

if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -291,11 +291,7 @@ async def _put201_creating_succeeded200_initial(
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)

if response.status_code == 200:
deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)

if response.status_code == 201:
deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)
deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)

if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,7 @@ async def _put201_creating_succeeded200_initial(
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)

if response.status_code == 200:
deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)

if response.status_code == 201:
deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)
deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)

if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
Expand Down Expand Up @@ -438,14 +434,11 @@ async def _delete_provisioning202_accepted200_succeeded_initial( # pylint: disa
raise HttpResponseError(response=response, error_format=ARMErrorFormat)

response_headers = {}
if response.status_code == 200:
deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)

if response.status_code == 202:
response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))

deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)
deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)

if cls:
return cls(pipeline_response, deserialized, response_headers) # type: ignore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,7 @@ async def _put200_succeeded_initial(
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)

if response.status_code == 200:
deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)

if response.status_code == 204:
deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)
deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)

if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
Expand Down Expand Up @@ -480,15 +476,12 @@ async def _patch201_retry_with_async_header_initial( # pylint: disable=name-too
raise HttpResponseError(response=response, error_format=ARMErrorFormat)

response_headers = {}
if response.status_code == 200:
deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)

if response.status_code == 201:
response_headers["Azure-AsyncOperation"] = self._deserialize(
"str", response.headers.get("Azure-AsyncOperation")
)

deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)
deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)

if cls:
return cls(pipeline_response, deserialized, response_headers) # type: ignore
Expand Down Expand Up @@ -643,16 +636,13 @@ async def _patch202_retry_with_async_and_location_header_initial( # pylint: dis
raise HttpResponseError(response=response, error_format=ARMErrorFormat)

response_headers = {}
if response.status_code == 200:
deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)

if response.status_code == 202:
response_headers["Azure-AsyncOperation"] = self._deserialize(
"str", response.headers.get("Azure-AsyncOperation")
)
response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))

deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)
deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)

if cls:
return cls(pipeline_response, deserialized, response_headers) # type: ignore
Expand Down Expand Up @@ -944,16 +934,13 @@ async def _post202_list_initial(self, **kwargs: Any) -> AsyncIterator[bytes]:
raise HttpResponseError(response=response, error_format=ARMErrorFormat)

response_headers = {}
if response.status_code == 200:
deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)

if response.status_code == 202:
response_headers["Azure-AsyncOperation"] = self._deserialize(
"str", response.headers.get("Azure-AsyncOperation")
)
response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))

deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)
deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)

if cls:
return cls(pipeline_response, deserialized, response_headers) # type: ignore
Expand Down Expand Up @@ -1371,11 +1358,7 @@ async def _put201_creating_succeeded200_initial(
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)

if response.status_code == 200:
deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)

if response.status_code == 201:
deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)
deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)

if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
Expand Down Expand Up @@ -1689,11 +1672,7 @@ async def _put201_creating_failed200_initial(
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)

if response.status_code == 200:
deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)

if response.status_code == 201:
deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)
deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)

if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
Expand Down Expand Up @@ -3510,14 +3489,11 @@ async def _delete_provisioning202_accepted200_succeeded_initial( # pylint: disa
raise HttpResponseError(response=response, error_format=ARMErrorFormat)

response_headers = {}
if response.status_code == 200:
deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)

if response.status_code == 202:
response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))

deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)
deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)

if cls:
return cls(pipeline_response, deserialized, response_headers) # type: ignore
Expand Down Expand Up @@ -3613,14 +3589,11 @@ async def _delete_provisioning202_deleting_failed200_initial( # pylint: disable
raise HttpResponseError(response=response, error_format=ARMErrorFormat)

response_headers = {}
if response.status_code == 200:
deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)

if response.status_code == 202:
response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))

deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)
deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)

if cls:
return cls(pipeline_response, deserialized, response_headers) # type: ignore
Expand Down Expand Up @@ -3716,14 +3689,11 @@ async def _delete_provisioning202_deletingcanceled200_initial( # pylint: disabl
raise HttpResponseError(response=response, error_format=ARMErrorFormat)

response_headers = {}
if response.status_code == 200:
deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)

if response.status_code == 202:
response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))

deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)
deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)

if cls:
return cls(pipeline_response, deserialized, response_headers) # type: ignore
Expand Down Expand Up @@ -3901,14 +3871,11 @@ async def _delete202_retry200_initial(self, **kwargs: Any) -> AsyncIterator[byte
raise HttpResponseError(response=response, error_format=ARMErrorFormat)

response_headers = {}
if response.status_code == 200:
deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)

if response.status_code == 202:
response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))

deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)
deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)

if cls:
return cls(pipeline_response, deserialized, response_headers) # type: ignore
Expand Down Expand Up @@ -3999,14 +3966,11 @@ async def _delete202_no_retry204_initial(self, **kwargs: Any) -> AsyncIterator[b
raise HttpResponseError(response=response, error_format=ARMErrorFormat)

response_headers = {}
if response.status_code == 200:
deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)

if response.status_code == 202:
response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))

deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)
deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)

if cls:
return cls(pipeline_response, deserialized, response_headers) # type: ignore
Expand Down Expand Up @@ -4100,10 +4064,7 @@ async def _delete_no_header_in_retry_initial(self, **kwargs: Any) -> AsyncIterat
if response.status_code == 202:
response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))

deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)

if response.status_code == 204:
deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)
deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)

if cls:
return cls(pipeline_response, deserialized, response_headers) # type: ignore
Expand Down Expand Up @@ -4192,10 +4153,7 @@ async def _delete_async_no_header_in_retry_initial(self, **kwargs: Any) -> Async
if response.status_code == 202:
response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))

deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)

if response.status_code == 204:
deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)
deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)

if cls:
return cls(pipeline_response, deserialized, response_headers) # type: ignore
Expand Down Expand Up @@ -4648,11 +4606,7 @@ async def _post200_with_payload_initial(self, **kwargs: Any) -> AsyncIterator[by
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)

if response.status_code == 200:
deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)

if response.status_code == 202:
deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)
deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)

if cls:
return cls(pipeline_response, deserialized, {}) # type: ignore
Expand Down Expand Up @@ -5363,17 +5317,14 @@ async def _post_async_retry_succeeded_initial(
raise HttpResponseError(response=response, error_format=ARMErrorFormat)

response_headers = {}
if response.status_code == 200:
deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)

if response.status_code == 202:
response_headers["Azure-AsyncOperation"] = self._deserialize(
"str", response.headers.get("Azure-AsyncOperation")
)
response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))

deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)
deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)

if cls:
return cls(pipeline_response, deserialized, response_headers) # type: ignore
Expand Down Expand Up @@ -5531,17 +5482,14 @@ async def _post_async_no_retry_succeeded_initial(
raise HttpResponseError(response=response, error_format=ARMErrorFormat)

response_headers = {}
if response.status_code == 200:
deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)

if response.status_code == 202:
response_headers["Azure-AsyncOperation"] = self._deserialize(
"str", response.headers.get("Azure-AsyncOperation")
)
response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))

deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)
deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)

if cls:
return cls(pipeline_response, deserialized, response_headers) # type: ignore
Expand Down
Loading

0 comments on commit 15cba4d

Please sign in to comment.