Skip to content

Commit

Permalink
Merge branch 'main' into feat/lifecycles
Browse files Browse the repository at this point in the history
  • Loading branch information
Churro authored Oct 10, 2024
2 parents 8cff89e + ced6d69 commit 028db25
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion cyclonedx/model/dependency.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,4 +113,4 @@ class Dependable(ABC):
@property
@abstractmethod
def bom_ref(self) -> BomRef:
...
... # pragma: no cover
14 changes: 7 additions & 7 deletions cyclonedx/output/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ def __init__(self, bom: 'Bom', **kwargs: int) -> None:
@property
@abstractmethod
def schema_version(self) -> SchemaVersion:
...
... # pragma: no cover

@property
@abstractmethod
def output_format(self) -> OutputFormat:
...
... # pragma: no cover

@property
def generated(self) -> bool:
Expand All @@ -69,13 +69,13 @@ def set_bom(self, bom: 'Bom') -> None:

@abstractmethod
def generate(self, force_regeneration: bool = False) -> None:
...
... # pragma: no cover

@abstractmethod
def output_as_string(self, *,
indent: Optional[Union[int, str]] = None,
**kwargs: Any) -> str:
...
... # pragma: no cover

def output_to_file(self, filename: str, allow_overwrite: bool = False, *,
indent: Optional[Union[int, str]] = None,
Expand All @@ -94,19 +94,19 @@ def output_to_file(self, filename: str, allow_overwrite: bool = False, *,
@overload
def make_outputter(bom: 'Bom', output_format: Literal[OutputFormat.JSON],
schema_version: SchemaVersion) -> 'JsonOutputter':
...
... # pragma: no cover


@overload
def make_outputter(bom: 'Bom', output_format: Literal[OutputFormat.XML],
schema_version: SchemaVersion) -> 'XmlOutputter':
...
... # pragma: no cover


@overload
def make_outputter(bom: 'Bom', output_format: OutputFormat,
schema_version: SchemaVersion) -> Union['XmlOutputter', 'JsonOutputter']:
...
... # pragma: no cover


def make_outputter(bom: 'Bom', output_format: OutputFormat, schema_version: SchemaVersion) -> BaseOutput:
Expand Down
2 changes: 1 addition & 1 deletion cyclonedx/output/json.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def output_as_string(self, *,

@abstractmethod
def _get_schema_uri(self) -> Optional[str]:
pass
... # pragma: no cover


class JsonV1Dot0(Json, SchemaVersion1Dot0):
Expand Down
2 changes: 1 addition & 1 deletion cyclonedx/schema/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class BaseSchemaVersion(ABC, ViewType):
@property
@abstractmethod
def schema_version_enum(self) -> SchemaVersion:
...
... # pragma: no cover

def get_schema_version(self) -> str:
return self.schema_version_enum.to_version()
Expand Down
12 changes: 6 additions & 6 deletions cyclonedx/validation/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def validate_str(self, data: str) -> Optional[ValidationError]:
:retval None: if ``data`` is valid
:retval ValidationError: if ``data`` is invalid
"""
...
... # pragma: no cover


class BaseSchemabasedValidator(ABC, SchemabasedValidator):
Expand All @@ -76,31 +76,31 @@ def schema_version(self) -> 'SchemaVersion':
@abstractmethod
def output_format(self) -> OutputFormat:
"""Get the format."""
...
... # pragma: no cover

@property
@abstractmethod
def _schema_file(self) -> Optional[str]:
"""Get the schema file according to schema version."""
...
... # pragma: no cover


@overload
def make_schemabased_validator(output_format: Literal[OutputFormat.JSON], schema_version: 'SchemaVersion'
) -> 'JsonValidator':
...
... # pragma: no cover


@overload
def make_schemabased_validator(output_format: Literal[OutputFormat.XML], schema_version: 'SchemaVersion'
) -> 'XmlValidator':
...
... # pragma: no cover


@overload
def make_schemabased_validator(output_format: OutputFormat, schema_version: 'SchemaVersion'
) -> Union['JsonValidator', 'XmlValidator']:
...
... # pragma: no cover


def make_schemabased_validator(output_format: OutputFormat, schema_version: 'SchemaVersion'
Expand Down

0 comments on commit 028db25

Please sign in to comment.