Skip to content

Commit

Permalink
Fix linter errors
Browse files Browse the repository at this point in the history
  • Loading branch information
cecille committed Jan 16, 2024
1 parent bda71e7 commit 83850c1
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/python_testing/TestConformanceSupport.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from conformance_support import (ConformanceDecision, ConformanceException, ConformanceParseParameters, deprecated, disallowed,
mandatory, optional, parse_basic_callable_from_xml, parse_callable_from_xml,
parse_device_type_callable_from_xml, provisional, zigbee)
from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main
from matter_testing_support import MatterBaseTest, default_matter_test_main
from mobly import asserts


Expand Down
5 changes: 1 addition & 4 deletions src/python_testing/TestSpecParsingDeviceType.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
import time
import xml.etree.ElementTree as ElementTree

import chip.clusters as Clusters
from chip.clusters.Types import NullValue
from jinja2 import Template
from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main
from matter_testing_support import MatterBaseTest, default_matter_test_main
from mobly import asserts
from spec_parsing_support import build_xml_device_types, parse_single_device_type

Expand Down
2 changes: 1 addition & 1 deletion src/python_testing/matter_testing_support.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
from dataclasses import dataclass, field
from datetime import datetime, timedelta, timezone
from enum import Enum
from typing import List, Optional, Tuple, Union
from typing import List, Optional, Tuple

from chip.tlv import float32, uint

Expand Down
4 changes: 2 additions & 2 deletions src/python_testing/spec_parsing_support.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def get_conformance(element: ElementTree.Element, cluster_id: int) -> ElementTre
elif element.tag == 'event':
location = EventPathLocation(endpoint_id=0, cluster_id=cluster_id, event_id=int(element.attrib['id'], 0))
else:
location = ClusterPathLocation(endpoint_id=0, cluster_id=self._cluster_id)
location = ClusterPathLocation(endpoint_id=0, cluster_id=cluster_id)
problem = ProblemNotice(test_name='Spec XML parsing', location=location,
severity=ProblemSeverity.WARNING, problem='Unable to find conformance element')

Expand Down Expand Up @@ -604,7 +604,7 @@ def parse_single_device_type(root: ElementTree.Element) -> tuple[list[ProblemNot
conformance = parse_device_type_callable_from_xml(conformance_xml)
device_types[id].clusters[cid] = XmlDeviceTypeClusterRequirements(
name=c.attrib['name'], conformance=conformance)
except ConformanceException as ex:
except ConformanceException:
location = DeviceTypePathLocation(device_type_id=id, cluster_id=cid)
problems.append(ProblemNotice("Parse Device Type XML", location=location,
severity=ProblemSeverity.WARNING, problem="Unable to parse conformance for cluster"))
Expand Down

0 comments on commit 83850c1

Please sign in to comment.