File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -278,12 +278,15 @@ def print_table(
278278 console = get_console ()
279279 table = Table (title = title , show_header = True , header_style = "bold magenta" )
280280 col_name_map = col_name_map or {}
281+ max_lines = get_settings ().table_max_lines
281282
282283 for column in columns :
283284 table .add_column (col_name_map .get (column , column ), style = "cyan" )
284285
285286 for item in data :
286- row = [LineLimit (str (item .get (col , "" )), max_lines = 4 ) for col in columns ]
287+ row = [str (item .get (col , "" )) for col in columns ]
288+ if max_lines > 0 :
289+ row = [LineLimit (cell , max_lines = max_lines ) for cell in row ]
287290 table .add_row (* row )
288291
289292 console .print (table )
Original file line number Diff line number Diff line change @@ -59,6 +59,9 @@ def _set_database_url_default(self) -> Self:
5959
6060 mcpgateway_bearer_token : Optional [str ] = None
6161
62+ # Max number of lines for printed tables (<1 => infinite)
63+ table_max_lines : int = 4
64+
6265
6366@lru_cache
6467def get_settings () -> CLISettings :
You can’t perform that action at this time.
0 commit comments