Skip to content

Commit ac1f48a

Browse files
authored
bc: remove parser API (#495)
Signed-off-by: Jan Kowalleck <[email protected]>
1 parent b10dc83 commit ac1f48a

File tree

2 files changed

+0
-87
lines changed

2 files changed

+0
-87
lines changed

cyclonedx/model/bom.py

-19
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
from sortedcontainers import SortedSet
2727

2828
from ..exception.model import LicenseExpressionAlongWithOthersException, UnknownComponentDependencyException
29-
from ..parser import BaseParser
3029
from ..schema.schema import (
3130
SchemaVersion1Dot0,
3231
SchemaVersion1Dot1,
@@ -260,28 +259,10 @@ class Bom:
260259
"""
261260
This is our internal representation of a bill-of-materials (BOM).
262261
263-
You can either create a `cyclonedx.model.bom.Bom` yourself programmatically, or generate a `cyclonedx.model.bom.Bom`
264-
from a `cyclonedx.parser.BaseParser` implementation.
265-
266262
Once you have an instance of `cyclonedx.model.bom.Bom`, you can pass this to an instance of
267263
`cyclonedx.output.BaseOutput` to produce a CycloneDX document according to a specific schema version and format.
268264
"""
269265

270-
@staticmethod
271-
def from_parser(parser: BaseParser) -> 'Bom':
272-
"""
273-
Create a Bom instance from a Parser object.
274-
275-
Args:
276-
parser (`cyclonedx.parser.BaseParser`): A valid parser instance.
277-
278-
Returns:
279-
`cyclonedx.model.bom.Bom`: A Bom instance that represents the valid data held in the supplied parser.
280-
"""
281-
bom = Bom()
282-
bom.components.update(parser.get_components())
283-
return bom
284-
285266
def __init__(self, *, components: Optional[Iterable[Component]] = None,
286267
services: Optional[Iterable[Service]] = None,
287268
external_references: Optional[Iterable[ExternalReference]] = None,

cyclonedx/parser/__init__.py

-68
This file was deleted.

0 commit comments

Comments
 (0)