Skip to content

Commit

Permalink
🎨 Run formatting over previous change
Browse files Browse the repository at this point in the history
Signed-off-by: Izzy Muerte <[email protected]>
  • Loading branch information
bruxisma committed Aug 10, 2023
1 parent f3509df commit 007d830
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions src/cmake_presets/items.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@


class CMakePresetItem(Item):
properties: VendorProperties # pyright: ignore
properties: VendorProperties # pyright: ignore
process: Optional[subprocess.CompletedProcess]
env: Mapping[str, str]

Expand Down Expand Up @@ -154,7 +154,7 @@ def collect(self) -> Iterator[CMakePresetItem]:
if preset.hidden:
continue
item = cls.from_parent(self, name=preset.name, preset=preset)
if skip_if := properties.skip_if: # pyright: ignore
if skip_if := properties.skip_if: # pyright: ignore
item.add_marker(pytest.mark.skipif(**skip_if))

# TODO: This needs to be a hook call of some kind. That or we
Expand Down
28 changes: 14 additions & 14 deletions src/cmake_presets/presets.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from dataclasses_json import LetterCase, config, dataclass_json


@dataclass_json(letter_case=LetterCase.CAMEL) # pyright: ignore
@dataclass_json(letter_case=LetterCase.CAMEL) # pyright: ignore
@dataclass
class Base:
name: str
Expand All @@ -25,17 +25,17 @@ def display_name(self) -> str:
return self.display or self.name


@dataclass_json(letter_case=LetterCase.CAMEL) # pyright: ignore
@dataclass_json(letter_case=LetterCase.CAMEL) # pyright: ignore
@dataclass
@final
class Configure(Base): # pyright: ignore
class Configure(Base): # pyright: ignore
generator: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL) # pyright: ignore
@dataclass_json(letter_case=LetterCase.CAMEL) # pyright: ignore
@dataclass
@final
class Build(Base): # pyright: ignore
class Build(Base): # pyright: ignore
verbose: bool = False
# This can't ever be empty, however, because of how python dataclasses
# work, we can't *just* declare this
Expand All @@ -46,37 +46,37 @@ class Build(Base): # pyright: ignore
clean_first: Optional[bool] = None


@dataclass_json(letter_case=LetterCase.CAMEL) # pyright: ignore
@dataclass_json(letter_case=LetterCase.CAMEL) # pyright: ignore
@dataclass
@final
class Test(Base): # pyright: ignore
class Test(Base): # pyright: ignore
configure_preset: str = field(default_factory=str)
overwrite_configuration_file: list[str] = field(default_factory=list)
# TODO: fill out the rest of the fields


@dataclass_json(letter_case=LetterCase.CAMEL) # pyright: ignore
@dataclass_json(letter_case=LetterCase.CAMEL) # pyright: ignore
@dataclass
@final
class Package(Base): # pyright: ignore
class Package(Base): # pyright: ignore
pass


@dataclass_json(letter_case=LetterCase.CAMEL) # pyright: ignore
@dataclass_json(letter_case=LetterCase.CAMEL) # pyright: ignore
@dataclass
@final
class File:
version: int
cmake_minimum_required: dict
configure_presets: list[Configure] = field(default_factory=list) # pyright: ignore
build_presets: list[Build] = field(default_factory=list) # pyright: ignore
configure_presets: list[Configure] = field(default_factory=list) # pyright: ignore
build_presets: list[Build] = field(default_factory=list) # pyright: ignore
include: list[str] = field(default_factory=list)
vendor: dict = field(default_factory=dict)
path: Path = field(init=False)


def load(path: Path) -> File: # pyright: ignore
def load(path: Path) -> File: # pyright: ignore
with path.open() as presets:
presets = File.from_dict(json.load(presets))
presets.path = path # pyright: ignore
presets.path = path # pyright: ignore
return presets
2 changes: 1 addition & 1 deletion src/cmake_presets/vendor.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def decode(item: Optional[str | bool | dict]):
return ExpectedFail(item)


@dataclass_json(letter_case=LetterCase.KEBAB) # pyright: ignore
@dataclass_json(letter_case=LetterCase.KEBAB) # pyright: ignore
@dataclass
class VendorProperties:
"""
Expand Down

0 comments on commit 007d830

Please sign in to comment.