From 7b9a6fc511c0282203507fe8a4b8fb53f3217845 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Thu, 26 Oct 2023 16:58:27 -0400 Subject: [PATCH] Fix linter errors --- .../matter_idl/data_model_xml/handlers/handlers.py | 4 ++-- .../matter_idl/data_model_xml/handlers/parsing.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/py_matter_idl/matter_idl/data_model_xml/handlers/handlers.py b/scripts/py_matter_idl/matter_idl/data_model_xml/handlers/handlers.py index 073cd0231edaaa..0cae26bf5207ec 100644 --- a/scripts/py_matter_idl/matter_idl/data_model_xml/handlers/handlers.py +++ b/scripts/py_matter_idl/matter_idl/data_model_xml/handlers/handlers.py @@ -21,7 +21,7 @@ CommandQuality, ConstantEntry, DataType, Enum, Field, FieldQuality, Idl, Struct, StructTag) from .base import BaseHandler, HandledDepth -from .context import Context, IdlPostProcessor +from .context import Context from .derivation import AddBaseInfoPostProcessor from .parsing import (ApplyConstraint, AttributesToAttribute, AttributesToBitFieldConstantEntry, AttributesToCommand, AttributesToEvent, AttributesToField, NormalizeDataType, NormalizeName, ParseInt, StringToAccessPrivilege) @@ -36,7 +36,7 @@ def is_unused_name(attrs: AttributesImpl): https://github.com/csa-data-model/projects/issues/363 """ - if not 'name' in attrs: + if 'name' not in attrs: return False return attrs['name'] in {'base reserved', 'derived reserved'} diff --git a/scripts/py_matter_idl/matter_idl/data_model_xml/handlers/parsing.py b/scripts/py_matter_idl/matter_idl/data_model_xml/handlers/parsing.py index d1a851963a583c..032d2f11067e70 100644 --- a/scripts/py_matter_idl/matter_idl/data_model_xml/handlers/parsing.py +++ b/scripts/py_matter_idl/matter_idl/data_model_xml/handlers/parsing.py @@ -174,7 +174,7 @@ def AttributesToBitFieldConstantEntry(attrs) -> ConstantEntry: """ assert "name" in attrs - if not 'bit' in attrs: + if 'bit' not in attrs: # TODO: multi-bit fields not supported in XML currently. Be lenient here to have some # diff # Issue: https://github.com/csa-data-model/projects/issues/347