Fix pylint warnings in xiaomi tests (#119373)

This commit is contained in:
epenet 2024-06-11 14:56:53 +02:00 committed by GitHub
parent f9cf7598da
commit 43db0e457c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -28,7 +28,7 @@ def mocked_requests(*args, **kwargs):
class MockResponse:
"""Class to represent a mocked response."""
def __init__(self, json_data, status_code):
def __init__(self, json_data, status_code) -> None:
"""Initialize the mock response class."""
self.json_data = json_data
self.status_code = status_code
@ -48,6 +48,7 @@ def mocked_requests(*args, **kwargs):
raise requests.HTTPError(self.status_code)
data = kwargs.get("data")
# pylint: disable-next=global-statement
global FIRST_CALL # noqa: PLW0603
if data and data.get("username", None) == INVALID_USERNAME: