Skip to content

Commit 41d1bee

Browse files
Remove flake8 warnings
Remove unused imports and trailing whitespace. Sort usings in pyi file. Signed-off-by: Rodney Richardson <[email protected]>
1 parent df0f554 commit 41d1bee

File tree

11 files changed

+16
-16
lines changed

11 files changed

+16
-16
lines changed

cyclonedx/model/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
import warnings
2222
from datetime import datetime
2323
from enum import Enum
24-
from typing import Any, Iterable, Optional, Set, TypeVar
24+
from typing import Any, Iterable, Optional
2525

2626
from sortedcontainers import SortedSet
2727

cyclonedx/model/bom.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# Copyright (c) OWASP Foundation. All Rights Reserved.
1919
import warnings
2020
from datetime import datetime, timezone
21-
from typing import Iterable, Optional, Set
21+
from typing import Iterable, Optional
2222
from uuid import UUID, uuid4
2323

2424
from sortedcontainers import SortedSet

cyclonedx/model/component.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import warnings
2121
from enum import Enum
2222
from os.path import exists
23-
from typing import Any, Iterable, Optional, Set
23+
from typing import Any, Iterable, Optional
2424

2525
# See https://github.com/package-url/packageurl-python/issues/65
2626
from packageurl import PackageURL # type: ignore

cyclonedx/model/dependency.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
# SPDX-License-Identifier: Apache-2.0
1818
# Copyright (c) OWASP Foundation. All Rights Reserved.
1919

20-
from typing import Iterable, Optional, Set
20+
from typing import Iterable, Optional
2121

2222
from sortedcontainers import SortedSet
2323

cyclonedx/model/issue.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# Copyright (c) OWASP Foundation. All Rights Reserved.
1717

1818
from enum import Enum
19-
from typing import Any, Iterable, Optional, Set
19+
from typing import Any, Iterable, Optional
2020

2121
from sortedcontainers import SortedSet
2222

cyclonedx/model/release_note.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# Copyright (c) OWASP Foundation. All Rights Reserved.
1919

2020
from datetime import datetime
21-
from typing import Iterable, Optional, Set
21+
from typing import Iterable, Optional
2222

2323
from sortedcontainers import SortedSet
2424

cyclonedx/model/service.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# SPDX-License-Identifier: Apache-2.0
1616
# Copyright (c) OWASP Foundation. All Rights Reserved.
1717

18-
from typing import Any, Iterable, Optional, Set
18+
from typing import Any, Iterable, Optional
1919

2020
from sortedcontainers import SortedSet
2121

cyclonedx/model/vulnerability.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
from datetime import datetime
2323
from decimal import Decimal
2424
from enum import Enum
25-
from typing import Any, Iterable, Optional, Set, Tuple, Union
25+
from typing import Any, Iterable, Optional, Tuple, Union
2626

2727
from sortedcontainers import SortedSet
2828

@@ -690,7 +690,7 @@ def __eq__(self, other: object) -> bool:
690690
def __lt__(self, other: Any) -> bool:
691691
if isinstance(other, VulnerabilityRating):
692692
return ComparableTuple(
693-
(self.severity, self.score, self.source, self.method, self.vector, self.justification)) < \
693+
(self.severity, self.score, self.source, self.method, self.vector, self.justification)) < \
694694
ComparableTuple(
695695
(other.severity, other.score, other.source, other.method, other.vector, other.justification))
696696
return NotImplemented

cyclonedx/output/xml.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# Copyright (c) OWASP Foundation. All Rights Reserved.
1919

2020
import warnings
21-
from typing import Iterable, Optional, Set
21+
from typing import Iterable, Optional
2222
from xml.etree import ElementTree
2323

2424
from sortedcontainers import SortedSet

tests/data.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -345,8 +345,8 @@ def get_component_setuptools_simple(bom_ref: Optional[str] = None) -> Component:
345345
bom_ref=bom_ref or 'pkg:pypi/[email protected]?extension=tar.gz',
346346
purl=PackageURL(
347347
type='pypi', name='setuptools', version='50.3.2', qualifiers='extension=tar.gz'
348-
),
349-
licenses=[LicenseChoice(license_expression='MIT License')],
348+
),
349+
licenses=[LicenseChoice(license_expression='MIT License')],
350350
author='Test Author'
351351
)
352352

@@ -356,8 +356,8 @@ def get_component_setuptools_simple_no_version(bom_ref: Optional[str] = None) ->
356356
name='setuptools', bom_ref=bom_ref or 'pkg:pypi/setuptools?extension=tar.gz',
357357
purl=PackageURL(
358358
type='pypi', name='setuptools', qualifiers='extension=tar.gz'
359-
),
360-
licenses=[LicenseChoice(license_expression='MIT License')],
359+
),
360+
licenses=[LicenseChoice(license_expression='MIT License')],
361361
author='Test Author'
362362
)
363363

0 commit comments

Comments
 (0)