@@ -777,10 +777,11 @@ def list_file_formats(self) -> dict:
777777 load = lambda : self .get ('/file_formats' , expected_status = 200 ).json ()
778778 )
779779 federation = self .capabilities ().ext_federation_backend_details ()
780- return VisualDict ("file-formats" , data = formats , parameters = {
781- 'missing' : formats .get ("federation:missing" , None ),
782- 'federation' : federation
783- })
780+ return VisualDict (
781+ "file-formats" ,
782+ data = formats ,
783+ parameters = {"missing" : formats .get ("federation:missing" , None ), "federation" : federation },
784+ )
784785
785786 def list_service_types (self ) -> dict :
786787 """
@@ -805,7 +806,7 @@ def list_udf_runtimes(self) -> dict:
805806 load = lambda : self .get ('/udf_runtimes' , expected_status = 200 ).json ()
806807 )
807808 federation = self .capabilities ().ext_federation_backend_details ()
808- return VisualDict ("udf-runtimes" , data = runtimes , parameters = {' federation' : federation })
809+ return VisualDict ("udf-runtimes" , data = runtimes , parameters = {" federation" : federation })
809810
810811 def list_services (self ) -> dict :
811812 """
@@ -816,11 +817,15 @@ def list_services(self) -> dict:
816817 # TODO return parsed service objects
817818 services = self .get ('/services' , expected_status = 200 ).json ()["services" ]
818819 federation = self .capabilities ().ext_federation_backend_details ()
819- return VisualList ("data-table" , data = services , parameters = {
820- 'columns' : 'services' ,
821- 'missing' : services .get ("federation:missing" , None ),
822- 'federation' : federation
823- })
820+ return VisualList (
821+ "data-table" ,
822+ data = services ,
823+ parameters = {
824+ "columns" : "services" ,
825+ "missing" : services .get ("federation:missing" , None ),
826+ "federation" : federation ,
827+ },
828+ )
824829
825830 def describe_collection (self , collection_id : str ) -> dict :
826831 """
@@ -838,7 +843,7 @@ def describe_collection(self, collection_id: str) -> dict:
838843 # TODO: add caching #383
839844 data = self .get (f"/collections/{ collection_id } " , expected_status = 200 ).json ()
840845 federation = self .capabilities ().ext_federation_backend_details ()
841- return VisualDict ("collection" , data = data , parameters = {' federation' : federation })
846+ return VisualDict ("collection" , data = data , parameters = {" federation" : federation })
842847
843848 def collection_items (
844849 self ,
@@ -877,7 +882,16 @@ def collection_items(
877882 params ['limit' ] = limit
878883
879884 federation = self .capabilities ().ext_federation_backend_details ()
880- return paginate (self , url , params , lambda response , page : VisualDict ("items" , data = response , parameters = {'show-map' : True , 'heading' : 'Page {} - Items' .format (page ), 'federation' : federation }))
885+ return paginate (
886+ self ,
887+ url ,
888+ params ,
889+ lambda response , page : VisualDict (
890+ "items" ,
891+ data = response ,
892+ parameters = {"show-map" : True , "heading" : "Page {} - Items" .format (page ), "federation" : federation },
893+ ),
894+ )
881895
882896 def collection_metadata (self , name ) -> CollectionMetadata :
883897 # TODO: duplication with `Connection.describe_collection`: deprecate one or the other?
@@ -920,11 +934,11 @@ def describe_process(self, id: str, namespace: Optional[str] = None) -> dict:
920934 federation = self .capabilities ().ext_federation_backend_details ()
921935 for process in processes :
922936 if process ["id" ] == id :
923- return VisualDict ("process" , data = process , parameters = {
924- 'show-graph' : True ,
925- 'provide-download' : False ,
926- ' federation' : federation
927- } )
937+ return VisualDict (
938+ "process" ,
939+ data = process ,
940+ parameters = { "show-graph" : True , "provide-download" : False , " federation" : federation },
941+ )
928942
929943 raise OpenEoClientException ("Process does not exist." )
930944
@@ -1514,14 +1528,18 @@ def list_files(self) -> List[UserFile]:
15141528
15151529 :return: List of the user-uploaded files.
15161530 """
1517- data = self .get (' /files' , expected_status = 200 ).json ()
1518- files = [UserFile .from_metadata (metadata = f , connection = self ) for f in data .get (' files' , [])]
1531+ data = self .get (" /files" , expected_status = 200 ).json ()
1532+ files = [UserFile .from_metadata (metadata = f , connection = self ) for f in data .get (" files" , [])]
15191533 federation = self .capabilities ().ext_federation_backend_details ()
1520- return VisualList ("data-table" , data = files , parameters = {
1521- 'columns' : 'files' ,
1522- 'missing' : data .get ('federation:missing' , None ),
1523- 'federation' : federation ,
1524- })
1534+ return VisualList (
1535+ "data-table" ,
1536+ data = files ,
1537+ parameters = {
1538+ "columns" : "files" ,
1539+ "missing" : data .get ("federation:missing" , None ),
1540+ "federation" : federation ,
1541+ },
1542+ )
15251543
15261544 def get_file (
15271545 self , path : Union [str , PurePosixPath ], metadata : Optional [dict ] = None
0 commit comments