Skip to content

Commit c4a0218

Browse files
committed
style: remove no longer used typehint-ignores
Signed-off-by: Jan Kowalleck <[email protected]>
1 parent 57625da commit c4a0218

File tree

3 files changed

+24
-24
lines changed

3 files changed

+24
-24
lines changed

cyclonedx/model/bom.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -716,7 +716,7 @@ def validate(self) -> bool:
716716
# 3. If a LicenseExpression is set, then there must be no other license.
717717
# see https://github.com/CycloneDX/specification/pull/205
718718
elem: Union[BomMetaData, Component, Service]
719-
for elem in chain( # type: ignore[assignment]
719+
for elem in chain( # type:ignore[assignment]
720720
[self.metadata],
721721
self.metadata.component.get_all_nested_components(include_self=True) if self.metadata.component else [],
722722
chain.from_iterable(c.get_all_nested_components(include_self=True) for c in self.components),

cyclonedx/model/component.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ def __init__(
425425
) -> None:
426426
self.type = type
427427
self.diff = diff
428-
self.resolves = resolves or [] # type:ignore[assignment]
428+
self.resolves = resolves or []
429429

430430
@property
431431
@serializable.xml_attribute()
@@ -521,11 +521,11 @@ def __init__(
521521
patches: Optional[Iterable[Patch]] = None,
522522
notes: Optional[str] = None,
523523
) -> None:
524-
self.ancestors = ancestors or [] # type:ignore[assignment]
525-
self.descendants = descendants or [] # type:ignore[assignment]
526-
self.variants = variants or [] # type:ignore[assignment]
527-
self.commits = commits or [] # type:ignore[assignment]
528-
self.patches = patches or [] # type:ignore[assignment]
524+
self.ancestors = ancestors or []
525+
self.descendants = descendants or []
526+
self.variants = variants or []
527+
self.commits = commits or []
528+
self.patches = patches or []
529529
self.notes = notes
530530

531531
@property
@@ -1009,31 +1009,31 @@ def __init__(
10091009
self._bom_ref = _bom_ref_from_str(bom_ref)
10101010
self.supplier = supplier
10111011
self.manufacturer = manufacturer
1012-
self.authors = authors or [] # type:ignore[assignment]
1012+
self.authors = authors or []
10131013
self.author = author
10141014
self.publisher = publisher
10151015
self.group = group
10161016
self.name = name
10171017
self.version = version
10181018
self.description = description
10191019
self.scope = scope
1020-
self.hashes = hashes or [] # type:ignore[assignment]
1021-
self.licenses = licenses or [] # type:ignore[assignment]
1020+
self.hashes = hashes or []
1021+
self.licenses = licenses or []
10221022
self.copyright = copyright
10231023
self.cpe = cpe
10241024
self.purl = purl
1025-
self.omnibor_ids = omnibor_ids or [] # type:ignore[assignment]
1026-
self.swhids = swhids or [] # type:ignore[assignment]
1025+
self.omnibor_ids = omnibor_ids or []
1026+
self.swhids = swhids or []
10271027
self.swid = swid
10281028
self.modified = modified
10291029
self.pedigree = pedigree
1030-
self.external_references = external_references or [] # type:ignore[assignment]
1031-
self.properties = properties or [] # type:ignore[assignment]
1032-
self.components = components or [] # type:ignore[assignment]
1030+
self.external_references = external_references or []
1031+
self.properties = properties or []
1032+
self.components = components or []
10331033
self.evidence = evidence
10341034
self.release_notes = release_notes
10351035
self.crypto_properties = crypto_properties
1036-
self.tags = tags or [] # type:ignore[assignment]
1036+
self.tags = tags or []
10371037

10381038
if modified:
10391039
warn('`.component.modified` is deprecated from CycloneDX v1.3 onwards. '

cyclonedx/model/component_evidence.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,8 @@ def __init__(
201201
self.field = field
202202
self.confidence = confidence
203203
self.concluded_value = concluded_value
204-
self.methods = methods or [] # type: ignore[assignment]
205-
self.tools = tools or [] # type: ignore[assignment]
204+
self.methods = methods or []
205+
self.tools = tools or []
206206

207207
@property
208208
@serializable.xml_sequence(1)
@@ -445,7 +445,7 @@ def __init__(
445445
self.package = package
446446
self.module = module
447447
self.function = function
448-
self.parameters = parameters or [] # type: ignore[assignment]
448+
self.parameters = parameters or []
449449
self.line = line
450450
self.column = column
451451
self.full_filename = full_filename
@@ -581,7 +581,7 @@ def __init__(
581581
self, *,
582582
frames: Optional[Iterable[CallStackFrame]] = None,
583583
) -> None:
584-
self.frames = frames or [] # type:ignore[assignment]
584+
self.frames = frames or []
585585

586586
@property
587587
@serializable.xml_array(serializable.XmlArraySerializationType.NESTED, 'frame')
@@ -641,11 +641,11 @@ def __init__(
641641
licenses: Optional[Iterable[License]] = None,
642642
copyright: Optional[Iterable[Copyright]] = None,
643643
) -> None:
644-
self.identity = identity or [] # type:ignore[assignment]
645-
self.occurrences = occurrences or [] # type:ignore[assignment]
644+
self.identity = identity or []
645+
self.occurrences = occurrences or []
646646
self.callstack = callstack
647-
self.licenses = licenses or [] # type:ignore[assignment]
648-
self.copyright = copyright or [] # type:ignore[assignment]
647+
self.licenses = licenses or []
648+
self.copyright = copyright or []
649649

650650
@property
651651
@serializable.view(SchemaVersion1Dot5)

0 commit comments

Comments
 (0)