Skip to content

Commit d058b33

Browse files
Replace type with type_definitions (project-chip#30209)
* Replace type with type_definitions * Minor change to make sure larger summary is used when merging patch * restyle --------- Co-authored-by: Andrei Litvin <andreilitvin@google.com>
1 parent 735c725 commit d058b33

File tree

13 files changed

+18
-18
lines changed

13 files changed

+18
-18
lines changed

scripts/codepregen.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
from pregenerate import FindPregenerationTargets, TargetFilter
3030

3131
from pregenerate.executors import DryRunner, ShellRunner
32-
from pregenerate.types import IdlFileType
32+
from pregenerate.type_definitions import IdlFileType
3333

3434
try:
3535
import coloredlogs

scripts/pregenerate/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from dataclasses import dataclass, field
2020
from typing import Iterator, List, Optional
2121

22-
from .types import IdlFileType, InputIdlFile
22+
from .type_definitions import IdlFileType, InputIdlFile
2323
from .using_codegen import (CodegenCppAppPregenerator, CodegenCppClustersTLVMetaPregenerator,
2424
CodegenCppProtocolsTLVMetaPregenerator, CodegenJavaClassPregenerator, CodegenJavaJNIPregenerator)
2525
from .using_zap import ZapApplicationPregenerator
File renamed without changes.

scripts/pregenerate/using_codegen.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
import logging
1616
import os
1717

18-
from .types import IdlFileType, InputIdlFile
18+
from .type_definitions import IdlFileType, InputIdlFile
1919

2020
CODEGEN_PY_PATH = os.path.abspath(os.path.join(
2121
os.path.dirname(__file__), '..', 'codegen.py'))

scripts/pregenerate/using_zap.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import os
1717
from enum import Enum, auto
1818

19-
from .types import IdlFileType, InputIdlFile
19+
from .type_definitions import IdlFileType, InputIdlFile
2020

2121
ZAP_GENERATE_PATH = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'tools', 'zap', 'generate.py'))
2222

scripts/py_matter_idl/files.gni

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ matter_idl_generator_sources = [
3838
"${chip_root}/scripts/py_matter_idl/matter_idl/generators/idl/__init__.py",
3939
"${chip_root}/scripts/py_matter_idl/matter_idl/generators/java/__init__.py",
4040
"${chip_root}/scripts/py_matter_idl/matter_idl/generators/registry.py",
41-
"${chip_root}/scripts/py_matter_idl/matter_idl/generators/types.py",
41+
"${chip_root}/scripts/py_matter_idl/matter_idl/generators/type_definitions.py",
4242
"${chip_root}/scripts/py_matter_idl/matter_idl/lint/__init__.py",
4343
"${chip_root}/scripts/py_matter_idl/matter_idl/lint/lint_rules_parser.py",
44-
"${chip_root}/scripts/py_matter_idl/matter_idl/lint/types.py",
44+
"${chip_root}/scripts/py_matter_idl/matter_idl/lint/type_definitions.py",
4545
"${chip_root}/scripts/py_matter_idl/matter_idl/matter_idl_parser.py",
4646
"${chip_root}/scripts/py_matter_idl/matter_idl/matter_idl_types.py",
4747
"${chip_root}/scripts/py_matter_idl/matter_idl/test_backwards_compatibility.py",

scripts/py_matter_idl/matter_idl/data_model_xml/handlers/parsing.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from typing import Optional
1919
from xml.sax.xmlreader import AttributesImpl
2020

21-
from matter_idl.generators.types import GetDataTypeSizeInBits, IsSignedDataType
21+
from matter_idl.generators.type_definitions import GetDataTypeSizeInBits, IsSignedDataType
2222
from matter_idl.matter_idl_types import AccessPrivilege, Attribute, Command, ConstantEntry, DataType, Event, EventPriority, Field
2323

2424
LOGGER = logging.getLogger('data-model-xml-data-parsing')

scripts/py_matter_idl/matter_idl/generators/java/__init__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
from typing import List, Optional, Set
2121

2222
from matter_idl.generators import CodeGenerator, GeneratorStorage
23-
from matter_idl.generators.types import (BasicInteger, BasicString, FundamentalType, IdlBitmapType, IdlEnumType, IdlType,
24-
ParseDataType, TypeLookupContext)
23+
from matter_idl.generators.type_definitions import (BasicInteger, BasicString, FundamentalType, IdlBitmapType, IdlEnumType, IdlType,
24+
ParseDataType, TypeLookupContext)
2525
from matter_idl.matter_idl_types import (Attribute, Cluster, ClusterSide, Command, DataType, Field, FieldQuality, Idl, Struct,
2626
StructQuality, StructTag)
2727
from stringcase import capitalcase

scripts/py_matter_idl/matter_idl/generators/kotlin/__init__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
from typing import List, Optional, Set
2121

2222
from matter_idl.generators import CodeGenerator, GeneratorStorage
23-
from matter_idl.generators.types import (BasicInteger, BasicString, FundamentalType, IdlBitmapType, IdlEnumType, IdlType,
24-
ParseDataType, TypeLookupContext)
23+
from matter_idl.generators.type_definitions import (BasicInteger, BasicString, FundamentalType, IdlBitmapType, IdlEnumType, IdlType,
24+
ParseDataType, TypeLookupContext)
2525
from matter_idl.matter_idl_types import (Attribute, Cluster, ClusterSide, Command, DataType, Field, FieldQuality, Idl, Struct,
2626
StructQuality, StructTag)
2727
from stringcase import capitalcase

scripts/py_matter_idl/matter_idl/lint/lint_rules_parser.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@
1111
from lark.visitors import Discard, Transformer, v_args
1212

1313
try:
14-
from .types import (AttributeRequirement, ClusterAttributeDeny, ClusterCommandRequirement, ClusterRequirement,
15-
ClusterValidationRule, RequiredAttributesRule, RequiredCommandsRule)
14+
from matter_idl.lint.type_definitions import AttributeRequirement
1615
except ImportError:
1716
import sys
18-
1917
sys.path.append(os.path.join(os.path.abspath(
2018
os.path.dirname(__file__)), "..", ".."))
21-
from matter_idl.lint.types import (AttributeRequirement, ClusterAttributeDeny, ClusterCommandRequirement, ClusterRequirement,
22-
ClusterValidationRule, RequiredAttributesRule, RequiredCommandsRule)
19+
from matter_idl.lint.type_definitions import AttributeRequirement
20+
21+
from matter_idl.lint.type_definitions import (ClusterAttributeDeny, ClusterCommandRequirement, ClusterRequirement,
22+
ClusterValidationRule, RequiredAttributesRule, RequiredCommandsRule)
2323

2424

2525
class ElementNotFoundError(Exception):

scripts/py_matter_idl/matter_idl/lint/types.py scripts/py_matter_idl/matter_idl/lint/type_definitions.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2022 Project CHIP Authors
1+
# Copyright (c) 2022-2023 Project CHIP Authors
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

scripts/py_matter_idl/matter_idl/zapxml/handlers/parsing.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
from typing import Optional
1616

17-
from matter_idl.generators.types import GetDataTypeSizeInBits, IsSignedDataType
17+
from matter_idl.generators.type_definitions import GetDataTypeSizeInBits, IsSignedDataType
1818
from matter_idl.matter_idl_types import AccessPrivilege, Attribute, AttributeQuality, DataType, Field, FieldQuality
1919

2020

0 commit comments

Comments
 (0)