Skip to content

Commit

Permalink
style: isort fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tngraf committed Jan 28, 2024
1 parent 561f366 commit a6e7138
Show file tree
Hide file tree
Showing 16 changed files with 23 additions and 18 deletions.
2 changes: 1 addition & 1 deletion capycli/bom/check_bom.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
import sys

import requests
import sw360.sw360_api
from colorama import Fore, Style
from cyclonedx.model.bom import Bom
from cyclonedx.model.component import Component

import capycli.common.script_base
import sw360.sw360_api
from capycli.common.capycli_bom_support import CaPyCliBom, CycloneDxSupport
from capycli.common.print import print_green, print_red, print_text, print_yellow
from capycli.main.result_codes import ResultCode
Expand Down
2 changes: 1 addition & 1 deletion capycli/bom/check_bom_item_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
from typing import Any, Dict, Optional

import requests
import sw360.sw360_api
from colorama import Fore, Style
from cyclonedx.model.bom import Bom
from cyclonedx.model.component import Component

import capycli.common.script_base
import sw360.sw360_api
from capycli.common.capycli_bom_support import CaPyCliBom, CycloneDxSupport
from capycli.common.print import print_red, print_text
from capycli.main.result_codes import ResultCode
Expand Down
2 changes: 1 addition & 1 deletion capycli/bom/create_components.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@

import packageurl
import requests
import sw360.sw360_api
from colorama import Fore, Style
from cyclonedx.model.bom import Bom
from cyclonedx.model.component import Component

import capycli.common.json_support
import capycli.common.script_base
import sw360.sw360_api
from capycli.common.capycli_bom_support import CaPyCliBom, CycloneDxSupport, SbomWriter
from capycli.common.print import print_green, print_red, print_text, print_yellow
from capycli.common.purl_utils import PurlUtils
Expand Down
9 changes: 5 additions & 4 deletions capycli/bom/findsources.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,25 @@
import os
import re
import sys
from typing import Any
import time
from typing import Any

import requests
import semver
from bs4 import BeautifulSoup
from colorama import Fore, Style

# from packageurl import PackageURL
from cyclonedx.model import ExternalReferenceType
from cyclonedx.model.bom import Bom
from sw360 import SW360Error
from cyclonedx.model.component import Component
from sw360 import SW360Error

import capycli.common.script_base
from capycli import get_logger
from capycli.common.capycli_bom_support import CaPyCliBom, CycloneDxSupport, SbomWriter
from capycli.common.print import print_green, print_red, print_text, print_yellow
from capycli.main.result_codes import ResultCode
from bs4 import BeautifulSoup
from colorama import Fore, Style

LOG = get_logger(__name__)

Expand Down
1 change: 1 addition & 0 deletions capycli/common/component_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import sys

import sw360

from capycli import get_logger
from capycli.common.print import print_red, print_text, print_yellow
from capycli.common.script_support import ScriptSupport
Expand Down
2 changes: 1 addition & 1 deletion capycli/common/purl_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
# ----------

import packageurl
from sw360 import SW360

from capycli.common.print import print_green, print_text, print_yellow
from capycli.common.purl_store import PurlStore
from capycli.common.purl_utils import PurlUtils
from sw360 import SW360


class PurlService:
Expand Down
2 changes: 1 addition & 1 deletion capycli/common/script_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@

import jwt
import requests
import sw360.sw360_api
from cyclonedx.model.bom import Bom

import sw360.sw360_api
from capycli.common.print import print_red, print_text, print_yellow
from capycli.main.result_codes import ResultCode

Expand Down
2 changes: 1 addition & 1 deletion capycli/project/create_bom.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
import logging
import sys

import sw360
from cyclonedx.model import ExternalReferenceType, HashAlgorithm
from cyclonedx.model.bom import Bom
from cyclonedx.model.component import Component

import capycli.common.script_base
import sw360
from capycli import get_logger
from capycli.common.capycli_bom_support import CaPyCliBom, CycloneDxSupport, SbomCreator
from capycli.common.print import print_red, print_text, print_yellow
Expand Down
2 changes: 1 addition & 1 deletion capycli/project/create_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
from typing import List

import requests
import sw360
from cyclonedx.model.bom import Bom

import capycli.common.script_base
import sw360
from capycli import get_logger
from capycli.common.capycli_bom_support import CaPyCliBom, CycloneDxSupport
from capycli.common.print import print_red, print_text, print_yellow
Expand Down
2 changes: 1 addition & 1 deletion capycli/project/find_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
import traceback

import requests
import sw360

import capycli.common.script_base
import sw360
from capycli.common.print import print_red, print_text, print_yellow
from capycli.main.result_codes import ResultCode

Expand Down
3 changes: 2 additions & 1 deletion capycli/project/get_license_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@
import os
import sys

import capycli.common.script_base
import sw360

import capycli.common.script_base
from capycli.common.json_support import load_json_file
from capycli.common.print import print_red, print_text, print_yellow
from capycli.common.script_support import ScriptSupport
Expand Down
3 changes: 2 additions & 1 deletion capycli/project/show_ecc.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
import logging
import sys

import capycli.common.script_base
import sw360

import capycli.common.script_base
from capycli.common.json_support import write_json_to_file
from capycli.common.print import print_green, print_red, print_text, print_yellow
from capycli.main.result_codes import ResultCode
Expand Down
2 changes: 1 addition & 1 deletion capycli/project/show_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
import logging
import sys

import sw360
from colorama import Fore

import capycli.common.json_support
import capycli.common.script_base
import sw360
from capycli.common.print import print_red, print_text, print_yellow
from capycli.main.result_codes import ResultCode

Expand Down
2 changes: 1 addition & 1 deletion capycli/project/show_vulnerabilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
import sys

import requests
import sw360
from colorama import Fore, Style

import capycli.common.json_support
import capycli.common.script_base
import sw360
from capycli.common.print import print_green, print_red, print_text, print_yellow
from capycli.main.result_codes import ResultCode

Expand Down
3 changes: 2 additions & 1 deletion tests/test_find_sources.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
# -------------------------------------------------------------------------------

import os
from unittest.mock import MagicMock, patch

import responses

import capycli.common.json_support
Expand All @@ -15,7 +17,6 @@
from capycli.common.capycli_bom_support import CaPyCliBom, CycloneDxSupport
from capycli.main.result_codes import ResultCode
from tests.test_base import AppArguments, TestBase
from unittest.mock import MagicMock, patch


class TestFindSources(TestBase):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_script_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
import os

import responses
from sw360.sw360error import SW360Error

from capycli.common.script_base import ScriptBase
from capycli.main.result_codes import ResultCode
from sw360.sw360error import SW360Error
from tests.test_base import TestBase


Expand Down

0 comments on commit a6e7138

Please sign in to comment.