Skip to content

Commit

Permalink
Remove flake8 warnings
Browse files Browse the repository at this point in the history
Remove unused imports and trailing whitespace.
Sort usings in pyi file.

Signed-off-by: Rodney Richardson <[email protected]>
  • Loading branch information
RodneyRichardson committed May 27, 2022
1 parent df0f554 commit 41d1bee
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion cyclonedx/model/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import warnings
from datetime import datetime
from enum import Enum
from typing import Any, Iterable, Optional, Set, TypeVar
from typing import Any, Iterable, Optional

from sortedcontainers import SortedSet

Expand Down
2 changes: 1 addition & 1 deletion cyclonedx/model/bom.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# Copyright (c) OWASP Foundation. All Rights Reserved.
import warnings
from datetime import datetime, timezone
from typing import Iterable, Optional, Set
from typing import Iterable, Optional
from uuid import UUID, uuid4

from sortedcontainers import SortedSet
Expand Down
2 changes: 1 addition & 1 deletion cyclonedx/model/component.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import warnings
from enum import Enum
from os.path import exists
from typing import Any, Iterable, Optional, Set
from typing import Any, Iterable, Optional

# See https://github.com/package-url/packageurl-python/issues/65
from packageurl import PackageURL # type: ignore
Expand Down
2 changes: 1 addition & 1 deletion cyclonedx/model/dependency.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright (c) OWASP Foundation. All Rights Reserved.

from typing import Iterable, Optional, Set
from typing import Iterable, Optional

from sortedcontainers import SortedSet

Expand Down
2 changes: 1 addition & 1 deletion cyclonedx/model/issue.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# Copyright (c) OWASP Foundation. All Rights Reserved.

from enum import Enum
from typing import Any, Iterable, Optional, Set
from typing import Any, Iterable, Optional

from sortedcontainers import SortedSet

Expand Down
2 changes: 1 addition & 1 deletion cyclonedx/model/release_note.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# Copyright (c) OWASP Foundation. All Rights Reserved.

from datetime import datetime
from typing import Iterable, Optional, Set
from typing import Iterable, Optional

from sortedcontainers import SortedSet

Expand Down
2 changes: 1 addition & 1 deletion cyclonedx/model/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright (c) OWASP Foundation. All Rights Reserved.

from typing import Any, Iterable, Optional, Set
from typing import Any, Iterable, Optional

from sortedcontainers import SortedSet

Expand Down
4 changes: 2 additions & 2 deletions cyclonedx/model/vulnerability.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from datetime import datetime
from decimal import Decimal
from enum import Enum
from typing import Any, Iterable, Optional, Set, Tuple, Union
from typing import Any, Iterable, Optional, Tuple, Union

from sortedcontainers import SortedSet

Expand Down Expand Up @@ -690,7 +690,7 @@ def __eq__(self, other: object) -> bool:
def __lt__(self, other: Any) -> bool:
if isinstance(other, VulnerabilityRating):
return ComparableTuple(
(self.severity, self.score, self.source, self.method, self.vector, self.justification)) < \
(self.severity, self.score, self.source, self.method, self.vector, self.justification)) < \
ComparableTuple(
(other.severity, other.score, other.source, other.method, other.vector, other.justification))
return NotImplemented
Expand Down
2 changes: 1 addition & 1 deletion cyclonedx/output/xml.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# Copyright (c) OWASP Foundation. All Rights Reserved.

import warnings
from typing import Iterable, Optional, Set
from typing import Iterable, Optional
from xml.etree import ElementTree

from sortedcontainers import SortedSet
Expand Down
8 changes: 4 additions & 4 deletions tests/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,8 +345,8 @@ def get_component_setuptools_simple(bom_ref: Optional[str] = None) -> Component:
bom_ref=bom_ref or 'pkg:pypi/[email protected]?extension=tar.gz',
purl=PackageURL(
type='pypi', name='setuptools', version='50.3.2', qualifiers='extension=tar.gz'
),
licenses=[LicenseChoice(license_expression='MIT License')],
),
licenses=[LicenseChoice(license_expression='MIT License')],
author='Test Author'
)

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

Expand Down
4 changes: 2 additions & 2 deletions typings/sortedcontainers.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
# https://github.com/althonos/python-sortedcontainers/blob/d0a225d7fd0fb4c54532b8798af3cbeebf97e2d5/sortedcontainers/sortedset.pyi

from typing import (
Any,
AbstractSet,
Any,
Callable,
Generic,
Hashable,
Expand All @@ -15,9 +15,9 @@ from typing import (
MutableSet,
Optional,
Sequence,
Set,
Tuple,
Type,
Set,
TypeVar,
Union,
overload,
Expand Down

0 comments on commit 41d1bee

Please sign in to comment.