Skip to content

Commit

Permalink
Map "matter" Python imports as first-party
Browse files Browse the repository at this point in the history
  • Loading branch information
arkq committed Jan 29, 2025
1 parent e7752da commit c1f160f
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ max_line_length = 132

[tool.isort]
line_length = 132
known_first_party = "matter"

[tool.ruff]
line-length = 132
Expand Down
1 change: 1 addition & 0 deletions scripts/py_matter_idl/matter/idl/generators/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
from typing import Dict, Optional

import jinja2

from matter.idl.matter_idl_types import Idl

from .filters import RegisterCommonFilters
Expand Down
4 changes: 2 additions & 2 deletions scripts/py_matter_idl/matter/idl/zapxml/handlers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from matter.idl.matter_idl_types import Idl

from .base import BaseHandler
from .context import Context
from .handlers import ConfiguratorHandler

from matter.idl.matter_idl_types import Idl


class ZapXmlHandler(BaseHandler):
"""Handles the top level (/) of a zap xml file.
Expand Down
1 change: 1 addition & 0 deletions scripts/py_matter_idl/matter/idl/zapxml_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

if __name__ == '__main__':
import click

from matter.idl.generators import GeneratorStorage
from matter.idl.generators.idl import IdlGenerator

Expand Down
1 change: 0 additions & 1 deletion src/controller/python/chip/clusters/Objects.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/controller/python/chip/yaml/format_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
from chip.clusters.Types import Nullable, NullValue
from chip.tlv import float32, uint
from chip.yaml.errors import ValidationError

from matter.idl import matter_idl_types


Expand Down
3 changes: 2 additions & 1 deletion src/controller/python/chip/yaml/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@
from chip.exceptions import ChipStackError
from chip.yaml.data_model_lookup import DataModelLookup
from chip.yaml.errors import ActionCreationError, UnexpectedActionCreationError
from matter.idl.generators.filters import to_pascal_case, to_snake_case
from matter_yamltests.pseudo_clusters.pseudo_clusters import get_default_pseudo_clusters

from matter.idl.generators.filters import to_pascal_case, to_snake_case

from .data_model_lookup import PreDefinedDataModelLookup

_PSEUDO_CLUSTERS = get_default_pseudo_clusters()
Expand Down

0 comments on commit c1f160f

Please sign in to comment.