@@ -29,7 +29,7 @@ def print_client(client: V1Alpha1Client, output: OutputType):
2929 case OutputMode .JSON | OutputMode .YAML | OutputMode .NAME :
3030 echo (client .dump (output ))
3131 case _:
32- echo (make_table (CLIENT_COLUMNS , [make_client_row (client )]))
32+ click . echo (make_table (CLIENT_COLUMNS , [make_client_row (client )]))
3333
3434
3535def print_clients (clients : V1Alpha1List [V1Alpha1Client ], namespace : str , output : OutputType ):
@@ -39,7 +39,7 @@ def print_clients(clients: V1Alpha1List[V1Alpha1Client], namespace: str, output:
3939 case _:
4040 if len (clients .items ) == 0 :
4141 raise click .ClickException (f'No resources found in "{ namespace } " namespace' )
42- echo (make_table (CLIENT_COLUMNS , list (map (make_client_row , clients .items ))))
42+ click . echo (make_table (CLIENT_COLUMNS , list (map (make_client_row , clients .items ))))
4343
4444
4545EXPORTER_COLUMNS = ["NAME" , "ENDPOINT" , "DEVICES" , "AGE" ]
@@ -85,9 +85,9 @@ def print_exporter(exporter: V1Alpha1Exporter, devices: bool, output: OutputType
8585 case _:
8686 if devices :
8787 # Print the devices for the exporter
88- echo (make_table (DEVICE_COLUMNS , get_device_rows ([exporter ])))
88+ click . echo (make_table (DEVICE_COLUMNS , get_device_rows ([exporter ])))
8989 else :
90- echo (make_table (EXPORTER_COLUMNS , [make_exporter_row (exporter )]))
90+ click . echo (make_table (EXPORTER_COLUMNS , [make_exporter_row (exporter )]))
9191
9292
9393def print_exporters (exporters : V1Alpha1List [V1Alpha1Exporter ], namespace : str , devices : bool , output : OutputType ):
@@ -98,9 +98,9 @@ def print_exporters(exporters: V1Alpha1List[V1Alpha1Exporter], namespace: str, d
9898 if len (exporters .items ) == 0 :
9999 raise click .ClickException (f'No resources found in "{ namespace } " namespace' )
100100 if devices :
101- echo (make_table (DEVICE_COLUMNS , get_device_rows (exporters .items )))
101+ click . echo (make_table (DEVICE_COLUMNS , get_device_rows (exporters .items )))
102102 else :
103- echo (make_table (EXPORTER_COLUMNS , list (map (make_exporter_row , exporters .items ))))
103+ click . echo (make_table (EXPORTER_COLUMNS , list (map (make_exporter_row , exporters .items ))))
104104
105105
106106LEASE_COLUMNS = ["NAME" , "CLIENT" , "SELECTOR" , "EXPORTER" , "STATUS" , "REASON" , "BEGIN" , "END" , "DURATION" , "AGE" ]
@@ -147,7 +147,7 @@ def print_lease(lease: V1Alpha1Lease, output: OutputType):
147147 case OutputMode .JSON | OutputMode .YAML | OutputMode .NAME :
148148 echo (lease .dump (output ))
149149 case _:
150- echo (make_table (LEASE_COLUMNS , [make_lease_row (lease )]))
150+ click . echo (make_table (LEASE_COLUMNS , [make_lease_row (lease )]))
151151
152152
153153def print_leases (leases : V1Alpha1List [V1Alpha1Lease ], namespace : str , output : OutputType ):
@@ -157,4 +157,4 @@ def print_leases(leases: V1Alpha1List[V1Alpha1Lease], namespace: str, output: Ou
157157 case _:
158158 if len (leases .items ) == 0 :
159159 raise click .ClickException (f'No resources found in "{ namespace } " namespace' )
160- echo (make_table (LEASE_COLUMNS , list (map (make_lease_row , leases .items ))))
160+ click . echo (make_table (LEASE_COLUMNS , list (map (make_lease_row , leases .items ))))
0 commit comments