File tree Expand file tree Collapse file tree 1 file changed +6
-12
lines changed Expand file tree Collapse file tree 1 file changed +6
-12
lines changed Original file line number Diff line number Diff line change @@ -377,18 +377,12 @@ def list_column(self, table_name: str) -> None:
377377 count_query = f"select count(*) from { table_name } "
378378 num_records = list (self .query_tap (count_query )[0 ].values ())[0 ]
379379
380- # All this block is to print nicely...
381- # This whole function should be better written and the output
382- # shown tidier
383- nlines = len (available_cols ) + 2
384- n_ = astropy .conf .max_lines
385- m_ = astropy .conf .max_width
386- astropy .conf .max_lines = nlines
387- astropy .conf .max_width = sys .maxsize
388- log .info (f"\n Columns present in the table { table_name } :\n { available_cols } \n "
389- f"\n Number of records present in the table { table_name } :\n { num_records } \n " )
390- astropy .conf .max_lines = n_
391- astropy .conf .max_width = m_
380+ with (astropy .conf .set_temp (
381+ "max_lines" , len (available_cols ) + 2 ),
382+ astropy .conf .set_temp (
383+ "max_width" , sys .maxsize )):
384+ log .info (f"\n Columns present in the table { table_name } :\n { available_cols } \n "
385+ f"\n Number of records present in the table { table_name } :\n { num_records } \n " )
392386
393387 def _query_on_allowed_values (
394388 self ,
You can’t perform that action at this time.
0 commit comments