forked from platypush/platypush
LINT
This commit is contained in:
parent
951950c864
commit
72c7444a45
2 changed files with 9 additions and 9 deletions
|
@ -165,9 +165,9 @@ class MqttPlugin(Plugin):
|
|||
username = username or self.username
|
||||
password = password or self.password
|
||||
|
||||
tls_version = tls_version or self.tls_version
|
||||
tls_version = tls_version or self.tls_version # type: ignore[reportGeneralTypeIssues]
|
||||
if tls_version:
|
||||
tls_version = self.get_tls_version(tls_version)
|
||||
tls_version = self.get_tls_version(tls_version) # type: ignore[reportGeneralTypeIssues]
|
||||
if tls_insecure is None:
|
||||
tls_insecure = self.tls_insecure
|
||||
|
||||
|
@ -180,7 +180,7 @@ class MqttPlugin(Plugin):
|
|||
ca_certs=tls_cafile,
|
||||
certfile=tls_certfile,
|
||||
keyfile=tls_keyfile,
|
||||
tls_version=tls_version,
|
||||
tls_version=tls_version, # type: ignore[reportGeneralTypeIssues]
|
||||
ciphers=tls_ciphers,
|
||||
)
|
||||
|
||||
|
|
|
@ -141,13 +141,13 @@ class ZwaveMqttPlugin(MqttPlugin, ZwaveBasePlugin):
|
|||
|
||||
@staticmethod
|
||||
def _parse_response(response: Union[dict, Response]) -> dict:
|
||||
if isinstance(response, Response):
|
||||
response = response.output
|
||||
rs: dict = (
|
||||
response.output if isinstance(response, Response) else response
|
||||
) # type: ignore[reportGeneralTypeIssues]
|
||||
|
||||
assert response.get('success') is True, response.get(
|
||||
'message', 'zwavejs2mqtt error'
|
||||
)
|
||||
return response
|
||||
assert rs.get('success') is True, rs.get('message', 'zwavejs2mqtt error')
|
||||
|
||||
return rs
|
||||
|
||||
def _api_request(self, api: str, *args, **kwargs):
|
||||
if len(args) == 1 and isinstance(args[0], dict):
|
||||
|
|
Loading…
Reference in a new issue