Skip to content

Commit

Permalink
Various changes by zap and restyler, that has nothing to do with my c…
Browse files Browse the repository at this point in the history
…hanges
  • Loading branch information
jsloth committed Jan 17, 2023
1 parent 7705fdc commit a28869c
Show file tree
Hide file tree
Showing 12 changed files with 40 additions and 43 deletions.
4 changes: 2 additions & 2 deletions docs/_extensions/external_content.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@

import filecmp
import os
from pathlib import Path
import re
import shutil
import tempfile
from typing import Dict, Any, List, Optional
from pathlib import Path
from typing import Any, Dict, List, Optional

from sphinx.application import Sphinx

Expand Down
3 changes: 2 additions & 1 deletion scripts/build/build/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
from enum import Enum, auto
from typing import Sequence

from .targets import BUILD_TARGETS
from builders.builder import BuilderOptions

from .targets import BUILD_TARGETS


class BuildSteps(Enum):
GENERATED = auto()
Expand Down
4 changes: 2 additions & 2 deletions scripts/build/build_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@

import click
import coloredlogs

import build
from builders.builder import BuilderOptions
from runner import PrintOnlyRunner, ShellRunner

import build

sys.path.append(os.path.abspath(os.path.dirname(__file__)))


Expand Down
9 changes: 2 additions & 7 deletions scripts/pregenerate/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,10 @@

import logging
import os

from typing import Iterator

from .types import InputIdlFile, IdlFileType


from .pregenerators import CodegenJavaPregenerator
from .pregenerators import CodegenBridgePregenerator
from .pregenerators import CodegenCppAppPregenerator
from .pregenerators import CodegenBridgePregenerator, CodegenCppAppPregenerator, CodegenJavaPregenerator
from .types import IdlFileType, InputIdlFile


def FindAllIdls(sdk_root: str) -> Iterator[InputIdlFile]:
Expand Down
6 changes: 3 additions & 3 deletions scripts/py_matter_idl/matter_idl/generators/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import os
import logging
import jinja2

import os
from typing import Dict

import jinja2
from matter_idl.matter_idl_types import Idl

from .filters import RegisterCommonFilters
Expand Down
10 changes: 5 additions & 5 deletions scripts/py_matter_idl/matter_idl/generators/bridge/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
import enum
import logging
import re
from typing import List, Set, Union

from matter_idl.generators import CodeGenerator, GeneratorStorage
from matter_idl.matter_idl_types import Idl, Field, Attribute, Cluster, ClusterSide
from matter_idl import matter_idl_types
from matter_idl.generators.types import (ParseDataType, BasicString, BasicInteger, FundamentalType,
IdlType, IdlEnumType, IdlBitmapType, TypeLookupContext)
from typing import Union, List, Set
from matter_idl.generators import CodeGenerator, GeneratorStorage
from matter_idl.generators.types import (BasicInteger, BasicString, FundamentalType, IdlBitmapType, IdlEnumType, IdlType,
ParseDataType, TypeLookupContext)
from matter_idl.matter_idl_types import Attribute, Cluster, ClusterSide, Field, Idl


def camel_to_const(s):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,16 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from matter_idl.generators import CodeGenerator, GeneratorStorage
from matter_idl.matter_idl_types import Idl, ClusterSide, Field, Attribute, Cluster, FieldQuality, Command, DataType
from matter_idl import matter_idl_types
from matter_idl.generators.types import ParseDataType, BasicString, BasicInteger, FundamentalType, IdlType, IdlEnumType, IdlBitmapType, TypeLookupContext
from typing import Union, List, Set
from stringcase import capitalcase

import enum
import logging
from typing import List, Set, Union

from matter_idl import matter_idl_types
from matter_idl.generators import CodeGenerator, GeneratorStorage
from matter_idl.generators.types import (BasicInteger, BasicString, FundamentalType, IdlBitmapType, IdlEnumType, IdlType,
ParseDataType, TypeLookupContext)
from matter_idl.matter_idl_types import Attribute, Cluster, ClusterSide, Command, DataType, Field, FieldQuality, Idl
from stringcase import capitalcase


def serverClustersOnly(clusters: List[Cluster]) -> List[Cluster]:
Expand Down
15 changes: 8 additions & 7 deletions scripts/py_matter_idl/matter_idl/generators/java/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,16 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from matter_idl.generators import CodeGenerator, GeneratorStorage
from matter_idl.matter_idl_types import Idl, ClusterSide, Field, Attribute, Cluster, FieldQuality, Command, DataType
from matter_idl import matter_idl_types
from matter_idl.generators.types import ParseDataType, BasicString, BasicInteger, FundamentalType, IdlType, IdlEnumType, IdlBitmapType, TypeLookupContext
from typing import Union, List, Set
from stringcase import capitalcase

import enum
import logging
from typing import List, Set, Union

from matter_idl import matter_idl_types
from matter_idl.generators import CodeGenerator, GeneratorStorage
from matter_idl.generators.types import (BasicInteger, BasicString, FundamentalType, IdlBitmapType, IdlEnumType, IdlType,
ParseDataType, TypeLookupContext)
from matter_idl.matter_idl_types import Attribute, Cluster, ClusterSide, Command, DataType, Field, FieldQuality, Idl
from stringcase import capitalcase


def FieldToGlobalName(field: Field, context: TypeLookupContext) -> Union[str, None]:
Expand Down
5 changes: 2 additions & 3 deletions scripts/py_matter_idl/matter_idl/zapxml/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,11 @@
import logging
import typing
import xml.sax.handler

from dataclasses import dataclass
from typing import Optional, Union, List
from typing import List, Optional, Union

from matter_idl.zapxml.handlers import Context, ZapXmlHandler
from matter_idl.matter_idl_types import Idl
from matter_idl.zapxml.handlers import Context, ZapXmlHandler


class ParseHandler(xml.sax.handler.ContentHandler):
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
6 changes: 3 additions & 3 deletions scripts/py_matter_yamltests/test_spec_definitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from matter_yamltests.definitions import *

import unittest
import io
import unittest

from matter_yamltests.definitions import *

source_cluster = '''<?xml version="1.0"?>
<configurator>
Expand Down
2 changes: 1 addition & 1 deletion src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm

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

0 comments on commit a28869c

Please sign in to comment.