Skip to content

Commit a2f19f3

Browse files
committed
fix import issue
1 parent 0a29bff commit a2f19f3

File tree

4 files changed

+20
-21
lines changed

4 files changed

+20
-21
lines changed

src/superannotate/__init__.py

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
import logging.config
21
import os
32
import sys
3+
sys.path.append(os.path.split(os.path.realpath(__file__))[0])
44

5-
import requests
6-
from packaging.version import parse
7-
from superannotate.lib.app.analytics.class_analytics import class_distribution
8-
from superannotate.lib.app.exceptions import AppException
9-
from superannotate.lib.app.input_converters.conversion import convert_json_version
10-
from superannotate.lib.app.input_converters.conversion import convert_project_type
11-
from superannotate.lib.app.input_converters.conversion import export_annotation
12-
from superannotate.lib.app.input_converters.conversion import import_annotation
13-
from superannotate.lib.app.interface.sdk_interface import SAClient
14-
from superannotate.lib.core import PACKAGE_VERSION_INFO_MESSAGE
15-
from superannotate.lib.core import PACKAGE_VERSION_MAJOR_UPGRADE
16-
from superannotate.lib.core import PACKAGE_VERSION_UPGRADE
17-
from superannotate.logger import get_default_logger
18-
from superannotate.version import __version__
19-
5+
import logging.config # noqa
6+
import requests # noqa
7+
from packaging.version import parse # noqa
8+
from superannotate.lib.app.analytics.class_analytics import class_distribution # noqa
9+
from superannotate.lib.app.exceptions import AppException # noqa
10+
from superannotate.lib.app.input_converters.conversion import convert_json_version # noqa
11+
from superannotate.lib.app.input_converters.conversion import convert_project_type # noqa
12+
from superannotate.lib.app.input_converters.conversion import export_annotation # noqa
13+
from superannotate.lib.app.input_converters.conversion import import_annotation # noqa
14+
from superannotate.lib.app.interface.sdk_interface import SAClient # noqa
15+
from superannotate.lib.core import PACKAGE_VERSION_INFO_MESSAGE # noqa
16+
from superannotate.lib.core import PACKAGE_VERSION_MAJOR_UPGRADE # noqa
17+
from superannotate.lib.core import PACKAGE_VERSION_UPGRADE # noqa
18+
from superannotate.logger import get_default_logger # noqa
19+
from superannotate.version import __version__ # noqa
2020

2121
__all__ = [
2222
"__version__",
@@ -34,7 +34,6 @@
3434

3535
__author__ = "Superannotate"
3636

37-
sys.path.append(os.path.split(os.path.realpath(__file__))[0])
3837
logging.getLogger("botocore").setLevel(logging.CRITICAL)
3938
logger = get_default_logger()
4039

src/superannotate/lib/app/interface/cli_interface.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ def export_project(
122122
export_name=export_name,
123123
folder_path=folder,
124124
extract_zip_contents=not disable_extract_zip_contents,
125-
to_s3_bucket= False,
125+
to_s3_bucket=False,
126126
)
127127
sys.exit(0)
128128

src/superannotate/lib/app/interface/sdk_interface.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,16 +66,16 @@ class SAClient(BaseInterfaceFacade):
6666
def __init__(
6767
self,
6868
token: str = None,
69-
host=constances.BACKEND_URL,
7069
config_path: str = constances.CONFIG_FILE_LOCATION,
7170
):
71+
host = constances.BACKEND_URL
7272
env_token = os.environ.get("SA_TOKEN")
7373
version = os.environ.get("SA_VERSION", "v1")
7474
ssl_verify = bool(os.environ.get("SA_SSL", True))
7575
if token:
7676
token = Controller.validate_token(token=token)
7777
elif env_token:
78-
host = os.environ.get("SA_UTR", constances.BACKEND_URL)
78+
host = os.environ.get("SA_URL", constances.BACKEND_URL)
7979

8080
token = Controller.validate_token(env_token)
8181
else:

tests/integration/annotations/test_get_annotations_per_frame.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def annotations_path(self):
3838
return os.path.join(self.folder_path, self.ANNOTATIONS_PATH)
3939

4040
def test_video_annotation_upload(self):
41-
sa.create_annotation_classes_from_classes_json(self.PROJECT_NAME, self.classes_path)
41+
# sa.create_annotation_classes_from_classes_json(self.PROJECT_NAME, self.classes_path)
4242

4343
_, _, _ = sa.attach_items(
4444
self.PROJECT_NAME,

0 commit comments

Comments
 (0)