Skip to content

Commit

Permalink
fixed pep8 issues
Browse files Browse the repository at this point in the history
Signed-off-by: lgvl <[email protected]>
  • Loading branch information
lgvl committed Apr 21, 2023
1 parent 0c6bf07 commit e27bb41
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion cyclonedx_py/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,8 @@ def get_arg_parser(*, prog: Optional[str] = None) -> argparse.ArgumentParser:
)

arg_parser.add_argument('-X', action='store_true', help='Enable debug output', dest='debug_enabled')
arg_parser.add_argument('--add-metadata', action='store', help='File to read metadata from', dest='input_metadata')
arg_parser.add_argument('--add-metadata', action='store', help='File to read metadata from',
dest='input_metadata')

return arg_parser

Expand Down
6 changes: 3 additions & 3 deletions cyclonedx_py/parser/poetry.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@

from cyclonedx.exception.model import CycloneDxModelException
from cyclonedx.model import ExternalReference, ExternalReferenceType, HashType, Property, XsUri
from cyclonedx.model.bom import BomMetaData
from cyclonedx.model.component import Component
from cyclonedx.parser import BaseParser
from cyclonedx.model.bom import BomMetaData

# See https://github.com/package-url/packageurl-python/issues/65
from packageurl import PackageURL # type: ignore
Expand Down Expand Up @@ -98,10 +98,10 @@ def __init__(
debug_message('Warning: suppressed {!r}', error)
del error
self._components.append(component)

if pyproject_toml_contents:
poetry_toml = load_toml(pyproject_toml_contents)
poetry_toml_metadata = poetry_toml.get('tool','').get('poetry','')
poetry_toml_metadata = poetry_toml.get('tool', '').get('poetry', '')
metadata_component = Component(
name=poetry_toml_metadata['name'], version=poetry_toml_metadata['version']
)
Expand Down

0 comments on commit e27bb41

Please sign in to comment.