@@ -1213,7 +1213,7 @@ def delete_unused_feature_schema(self, feature_schema_id: str) -> None:
1213
1213
1214
1214
endpoint = self .rest_endpoint + "/feature-schemas/" + urllib .parse .quote (
1215
1215
feature_schema_id )
1216
- response = self ._connection .delete (endpoint , )
1216
+ response = self ._connection .delete (endpoint )
1217
1217
1218
1218
if response .status_code != requests .codes .no_content :
1219
1219
raise labelbox .exceptions .LabelboxError (
@@ -1230,7 +1230,7 @@ def delete_unused_ontology(self, ontology_id: str) -> None:
1230
1230
"""
1231
1231
endpoint = self .rest_endpoint + "/ontologies/" + urllib .parse .quote (
1232
1232
ontology_id )
1233
- response = self ._connection .delete (endpoint , )
1233
+ response = self ._connection .delete (endpoint )
1234
1234
1235
1235
if response .status_code != requests .codes .no_content :
1236
1236
raise labelbox .exceptions .LabelboxError (
@@ -1252,10 +1252,7 @@ def update_feature_schema_title(self, feature_schema_id: str,
1252
1252
1253
1253
endpoint = self .rest_endpoint + "/feature-schemas/" + urllib .parse .quote (
1254
1254
feature_schema_id ) + '/definition'
1255
- response = self ._connection .patch (
1256
- endpoint ,
1257
- json = {"title" : title },
1258
- )
1255
+ response = self ._connection .patch (endpoint , json = {"title" : title })
1259
1256
1260
1257
if response .status_code == requests .codes .ok :
1261
1258
return self .get_feature_schema (feature_schema_id )
@@ -1285,9 +1282,7 @@ def upsert_feature_schema(self, feature_schema: Dict) -> FeatureSchema:
1285
1282
endpoint = self .rest_endpoint + "/feature-schemas/" + urllib .parse .quote (
1286
1283
feature_schema_id )
1287
1284
response = self ._connection .put (
1288
- endpoint ,
1289
- json = {"normalized" : json .dumps (feature_schema )},
1290
- )
1285
+ endpoint , json = {"normalized" : json .dumps (feature_schema )})
1291
1286
1292
1287
if response .status_code == requests .codes .ok :
1293
1288
return self .get_feature_schema (response .json ()['schemaId' ])
@@ -1313,10 +1308,7 @@ def insert_feature_schema_into_ontology(self, feature_schema_id: str,
1313
1308
endpoint = self .rest_endpoint + '/ontologies/' + urllib .parse .quote (
1314
1309
ontology_id ) + "/feature-schemas/" + urllib .parse .quote (
1315
1310
feature_schema_id )
1316
- response = self ._connection .post (
1317
- endpoint ,
1318
- json = {"position" : position },
1319
- )
1311
+ response = self ._connection .post (endpoint , json = {"position" : position })
1320
1312
if response .status_code != requests .codes .created :
1321
1313
raise labelbox .exceptions .LabelboxError (
1322
1314
"Failed to insert the feature schema into the ontology, message: "
@@ -1337,10 +1329,7 @@ def get_unused_ontologies(self, after: str = None) -> List[str]:
1337
1329
"""
1338
1330
1339
1331
endpoint = self .rest_endpoint + "/ontologies/unused"
1340
- response = self ._connection .get (
1341
- endpoint ,
1342
- json = {"after" : after },
1343
- )
1332
+ response = self ._connection .get (endpoint , json = {"after" : after })
1344
1333
1345
1334
if response .status_code == requests .codes .ok :
1346
1335
return response .json ()
@@ -1364,10 +1353,7 @@ def get_unused_feature_schemas(self, after: str = None) -> List[str]:
1364
1353
"""
1365
1354
1366
1355
endpoint = self .rest_endpoint + "/feature-schemas/unused"
1367
- response = self ._connection .get (
1368
- endpoint ,
1369
- json = {"after" : after },
1370
- )
1356
+ response = self ._connection .get (endpoint , json = {"after" : after })
1371
1357
1372
1358
if response .status_code == requests .codes .ok :
1373
1359
return response .json ()
@@ -1888,7 +1874,7 @@ def is_feature_schema_archived(self, ontology_id: str,
1888
1874
1889
1875
ontology_endpoint = self .rest_endpoint + "/ontologies/" + urllib .parse .quote (
1890
1876
ontology_id )
1891
- response = self ._connection .get (ontology_endpoint , )
1877
+ response = self ._connection .get (ontology_endpoint )
1892
1878
1893
1879
if response .status_code == requests .codes .ok :
1894
1880
feature_schema_nodes = response .json ()['featureSchemaNodes' ]
@@ -1964,7 +1950,7 @@ def delete_feature_schema_from_ontology(
1964
1950
ontology_endpoint = self .rest_endpoint + "/ontologies/" + urllib .parse .quote (
1965
1951
ontology_id ) + "/feature-schemas/" + urllib .parse .quote (
1966
1952
feature_schema_id )
1967
- response = self ._connection .delete (ontology_endpoint , )
1953
+ response = self ._connection .delete (ontology_endpoint )
1968
1954
1969
1955
if response .status_code == requests .codes .ok :
1970
1956
response_json = response .json ()
@@ -1998,7 +1984,7 @@ def unarchive_feature_schema_node(self, ontology_id: str,
1998
1984
ontology_endpoint = self .rest_endpoint + "/ontologies/" + urllib .parse .quote (
1999
1985
ontology_id ) + '/feature-schemas/' + urllib .parse .quote (
2000
1986
root_feature_schema_id ) + '/unarchive'
2001
- response = self ._connection .patch (ontology_endpoint , )
1987
+ response = self ._connection .patch (ontology_endpoint )
2002
1988
if response .status_code == requests .codes .ok :
2003
1989
if not bool (response .json ()['unarchived' ]):
2004
1990
raise labelbox .exceptions .LabelboxError (
0 commit comments