File tree Expand file tree Collapse file tree 2 files changed +11
-10
lines changed Expand file tree Collapse file tree 2 files changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -432,7 +432,7 @@ def _widths(self):
432
432
widths = w
433
433
return tuple (widths )
434
434
435
- def _repr_ (self ):
435
+ def _repr_ (self ) -> str :
436
436
r"""
437
437
String representation of a table.
438
438
@@ -470,7 +470,8 @@ def _repr_(self):
470
470
471
471
for row in rows [:- 1 ]:
472
472
s += self ._str_table_row (row , header_row = False )
473
- s += self ._str_table_row (rows [- 1 ], header_row = False , last_row = True )
473
+ if rows :
474
+ s += self ._str_table_row (rows [- 1 ], header_row = False , last_row = True )
474
475
return s .strip ("\n " )
475
476
476
477
def _rich_repr_ (self , display_manager , ** kwds ):
Original file line number Diff line number Diff line change 8
8
sage: pkgs = all_installed_packages(ignore_dot_gap=True)
9
9
sage: test_packages(pkgs, only_failures=True) # optional - gap_packages
10
10
Status Package GAP Output
11
- +--------+---------+------------+
11
+ ├────────┼─────────┼────────────┤
12
12
13
13
sage: test_packages(['primgrp', 'smallgrp'])
14
14
Status Package GAP Output
@@ -51,13 +51,13 @@ def test_packages(packages, only_failures=False):
51
51
52
52
sage: pkgs = all_installed_packages()
53
53
sage: test_packages(pkgs) # random output
54
- Status Package GAP Output
55
- +---------+------------+------------+
56
- Alnuth true
57
- GAPDoc true
58
- sonata true
59
- tomlib true
60
- toric true
54
+ Status Package GAP Output
55
+ ├────────┼─────────┼────────────┤
56
+ Alnuth true
57
+ GAPDoc true
58
+ sonata true
59
+ tomlib true
60
+ toric true
61
61
"""
62
62
rows = [['Status' , 'Package' , 'GAP Output' ]]
63
63
for pkgdir in packages :
You can’t perform that action at this time.
0 commit comments