Skip to content

Commit 0998081

Browse files
committed
chore: ignore coverage of abstract methods
Signed-off-by: Jan Kowalleck <[email protected]>
1 parent 2b952e9 commit 0998081

File tree

5 files changed

+16
-16
lines changed

5 files changed

+16
-16
lines changed

cyclonedx/model/dependency.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,4 +113,4 @@ class Dependable(ABC):
113113
@property
114114
@abstractmethod
115115
def bom_ref(self) -> BomRef:
116-
...
116+
... # pragma: no cover

cyclonedx/output/__init__.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@ def __init__(self, bom: 'Bom', **kwargs: int) -> None:
4646
@property
4747
@abstractmethod
4848
def schema_version(self) -> SchemaVersion:
49-
...
49+
... # pragma: no cover
5050

5151
@property
5252
@abstractmethod
5353
def output_format(self) -> OutputFormat:
54-
...
54+
... # pragma: no cover
5555

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

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

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

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

9999

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

105105

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

111111

112112
def make_outputter(bom: 'Bom', output_format: OutputFormat, schema_version: SchemaVersion) -> BaseOutput:

cyclonedx/output/json.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def output_as_string(self, *,
8686

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

9191

9292
class JsonV1Dot0(Json, SchemaVersion1Dot0):

cyclonedx/schema/schema.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class BaseSchemaVersion(ABC, ViewType):
2828
@property
2929
@abstractmethod
3030
def schema_version_enum(self) -> SchemaVersion:
31-
...
31+
... # pragma: no cover
3232

3333
def get_schema_version(self) -> str:
3434
return self.schema_version_enum.to_version()

cyclonedx/validation/__init__.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def validate_str(self, data: str) -> Optional[ValidationError]:
5656
:retval None: if ``data`` is valid
5757
:retval ValidationError: if ``data`` is invalid
5858
"""
59-
...
59+
... # pragma: no cover
6060

6161

6262
class BaseSchemabasedValidator(ABC, SchemabasedValidator):
@@ -76,31 +76,31 @@ def schema_version(self) -> 'SchemaVersion':
7676
@abstractmethod
7777
def output_format(self) -> OutputFormat:
7878
"""Get the format."""
79-
...
79+
... # pragma: no cover
8080

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

8787

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

9393

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

9999

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

105105

106106
def make_schemabased_validator(output_format: OutputFormat, schema_version: 'SchemaVersion'

0 commit comments

Comments
 (0)