@@ -401,7 +401,7 @@ def protocols(
401401def version () -> None :
402402 """Display the version of Python and the version of the Python SDK in use."""
403403
404- console .print (f"Python: v { platform .python_version ()} \n Python SDK: v{ sdk_version } " )
404+ console .print (f"Python: { platform .python_version ()} \n Python SDK: v{ sdk_version } " )
405405
406406
407407@app .command (name = "info" )
@@ -482,7 +482,7 @@ def info(detail: bool = typer.Option(False, help="Display detailed information."
482482 "error" : None ,
483483 "status" : ":x:" ,
484484 "infrahub_version" : "N/A" ,
485- "user_info" : None ,
485+ "user_info" : {} ,
486486 "groups" : {},
487487 }
488488 try :
@@ -535,7 +535,7 @@ def info(detail: bool = typer.Option(False, help="Display detailed information."
535535 layout ["version_info" ].update (Panel (version_info , title = "Version Information" ))
536536
537537 # SDK client configuration panel
538- pretty_model = Pretty (client .config .dict (), expand_all = True )
538+ pretty_model = Pretty (client .config .model_dump (), expand_all = True )
539539 layout ["client_info" ].update (Panel (pretty_model , title = "Client Info" ))
540540
541541 # Infrahub information planel
@@ -560,12 +560,14 @@ def info(detail: bool = typer.Option(False, help="Display detailed information."
560560 # Simple output
561561 table = Table (show_header = False , box = None )
562562 table .add_row ("Address:" , client .config .address )
563- table .add_row ("Connection Status" , info ["status" ])
563+ table .add_row ("Connection Status: " , info ["status" ])
564564 if info ["error" ]:
565565 table .add_row ("Connection Error:" , info ["error" ])
566566
567567 table .add_row ("Python Version:" , platform .python_version ())
568568 table .add_row ("SDK Version:" , sdk_version )
569569 table .add_row ("Infrahub Version:" , info ["infrahub_version" ])
570+ if account := info ["user_info" ].get ("AccountProfile" ):
571+ table .add_row ("User:" , account ["display_label" ])
570572
571573 console .print (table )
0 commit comments