Skip to content

Commit 098d96f

Browse files
fix(pre_commit): 🎨 auto format pre-commit hooks
1 parent fd6990b commit 098d96f

File tree

5 files changed

+20
-20
lines changed

5 files changed

+20
-20
lines changed

roboflow/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,16 +237,16 @@ def workspace(self, the_workspace=None):
237237

238238
if the_workspace is None:
239239
the_workspace = self.current_workspace
240-
240+
241241
if self.api_key: # Check if api_key was passed during __init__
242242
workspace_api_key = load_roboflow_api_key(the_workspace)
243243
api_key = workspace_api_key or self.api_key
244244
list_projects = rfapi.get_workspace(api_key, the_workspace)
245245
return Workspace(list_projects, api_key, the_workspace, self.model_format)
246-
246+
247247
elif self.api_key in DEMO_KEYS:
248248
return Workspace({}, self.api_key, the_workspace, self.model_format)
249-
249+
250250
else:
251251
raise ValueError("A valid API key must be provided.")
252252

roboflow/core/project.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def __init__(self, api_key: str, a_project: dict, model_format: Optional[str] =
5353
5454
>>> project = rf.workspace().project("PROJECT_ID")
5555
"""
56-
56+
5757
if api_key:
5858
self.__api_key = api_key
5959
self.annotation = a_project["annotation"]
@@ -73,14 +73,13 @@ def __init__(self, api_key: str, a_project: dict, model_format: Optional[str] =
7373
temp = self.id.rsplit("/")
7474
self.__workspace = temp[0]
7575
self.__project_name = temp[1]
76-
76+
7777
elif DEMO_KEYS:
7878
self.__api_key = DEMO_KEYS[0]
7979
self.model_format = model_format
80-
80+
8181
else:
8282
raise ValueError("A valid API key must be provided.")
83-
8483

8584
def get_version_information(self):
8685
"""

roboflow/core/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ def __init__(
132132
self.model = KeypointDetectionModel(self.__api_key, self.id, version=version_without_workspace)
133133
else:
134134
self.model = None
135-
135+
136136
elif DEMO_KEYS:
137137
api_key = DEMO_KEYS[0]
138138
if api_key == "coco-128-sample":

roboflow/core/workspace.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ class Workspace:
2323
"""
2424
Manage a Roboflow workspace.
2525
"""
26+
2627
def __init__(self, info, api_key, default_workspace, model_format):
27-
2828
if api_key:
29-
self.__api_key = api_key
30-
29+
self.__api_key = api_key
30+
3131
workspace_info = info["workspace"]
3232
self.name = workspace_info["name"]
3333
self.project_list = workspace_info["projects"]
@@ -43,7 +43,7 @@ def __init__(self, info, api_key, default_workspace, model_format):
4343

4444
else:
4545
raise ValueError("A valid API key must be provided.")
46-
46+
4747
def list_projects(self):
4848
"""
4949
Print all projects in the workspace to the console.

roboflow/roboflowpy.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -113,17 +113,17 @@ def get_workspace(args):
113113
print(json.dumps(workspace_json, indent=2))
114114

115115

116-
117116
def get_workspace_project_version(args):
118-
#api_key = load_roboflow_api_key(args.workspaceId)
117+
# api_key = load_roboflow_api_key(args.workspaceId)
119118
rf = roboflow.Roboflow(args.api_key)
120119
workspace = rf.workspace()
121-
print('workspace',workspace)
120+
print("workspace", workspace)
122121
project = workspace.project(args.project)
123-
print('project',project)
122+
print("project", project)
124123
version = project.version(args.version_number)
125-
print('version',version)
126-
124+
print("version", version)
125+
126+
127127
def get_project(args):
128128
workspace_url = args.workspace or get_conditional_configuration_variable("RF_WORKSPACE", default=None)
129129
api_key = load_roboflow_api_key(workspace_url)
@@ -174,7 +174,6 @@ def _argparser():
174174
_add_upload_model_parser(subparsers)
175175
_add_get_workspace_project_version_parser(subparsers)
176176

177-
178177
return parser
179178

180179

@@ -424,6 +423,7 @@ def _add_upload_model_parser(subparsers):
424423
)
425424
upload_model_parser.set_defaults(func=upload_model)
426425

426+
427427
def _add_get_workspace_project_version_parser(subparsers):
428428
workspace_project_version_parser = subparsers.add_parser(
429429
"get_workspace_info",
@@ -451,7 +451,8 @@ def _add_get_workspace_project_version_parser(subparsers):
451451
help="version number to upload the model to",
452452
)
453453
workspace_project_version_parser.set_defaults(func=get_workspace_project_version)
454-
454+
455+
455456
def _add_login_parser(subparsers):
456457
login_parser = subparsers.add_parser("login", help="Log in to Roboflow")
457458
login_parser.set_defaults(func=login)

0 commit comments

Comments
 (0)