File tree Expand file tree Collapse file tree 8 files changed +135
-136
lines changed
Expand file tree Collapse file tree 8 files changed +135
-136
lines changed Original file line number Diff line number Diff line change 44
55import requests
66import superannotate .lib .core as constances
7- from lib import get_default_controller
7+ from superannotate . lib import get_default_controller
88from packaging .version import parse
99from superannotate .lib .app .analytics .class_analytics import class_distribution
1010from superannotate .lib .app .exceptions import AppException
107107)
108108from superannotate .lib .app .interface .sdk_interface import validate_annotations
109109from superannotate .logger import get_default_logger
110+ from superannotate .lib .infrastructure .controller import Controller
110111from superannotate .version import __version__
111112
112113
Original file line number Diff line number Diff line change 66sys .path .append (os .path .dirname (os .path .dirname (os .path .abspath (__file__ ))))
77
88
9- DEFAULT_CONTROLLER = None
10-
11-
12- def get_default_controller (raise_exception = False ):
9+ def get_default_controller ():
1310 from lib .infrastructure .controller import Controller
14- try :
15- global DEFAULT_CONTROLLER
16- if not DEFAULT_CONTROLLER :
17- DEFAULT_CONTROLLER = Controller ()
18- return DEFAULT_CONTROLLER
19- except Exception :
20- if raise_exception :
21- raise
22-
11+ return Controller .get_default ()
2312
24- def set_default_controller (controller_obj ):
25- # global DEFAULT_CONTROLLER
26- DEFAULT_CONTROLLER = controller_obj
Original file line number Diff line number Diff line change 1212from lib .app .interface .sdk_interface import attach_document_urls_to_project
1313from lib .app .interface .sdk_interface import attach_image_urls_to_project
1414from lib .app .interface .sdk_interface import attach_video_urls_to_project
15- from lib .app .interface .sdk_interface import controller
1615from lib .app .interface .sdk_interface import create_folder
1716from lib .app .interface .sdk_interface import create_project
1817from lib .app .interface .sdk_interface import upload_annotations_from_folder_to_project
2120from lib .app .interface .sdk_interface import upload_videos_from_folder_to_project
2221from lib .core .entities import ConfigEntity
2322from lib .infrastructure .repositories import ConfigRepository
23+ from lib .infrastructure .controller import Controller
24+
25+
26+ controller = Controller .get_default ()
2427
2528
2629class CLIFacade (BaseInterfaceFacade ):
You can’t perform that action at this time.
0 commit comments