Closed tleonhardt closed 6 years ago
@anselor Putting the grid styles into an inheritance hierarchy and having the generate_table
method and TableFormatter
class accept an instance within this hierarchy seems like a good idea to me.
But please review this and make sure it doesn't present a headache or undue burden to you.
Merging #13 into master will decrease coverage by
0.65%
. The diff coverage is93.98%
.
@@ Coverage Diff @@
## master #13 +/- ##
==========================================
- Coverage 78.94% 78.28% -0.66%
==========================================
Files 1 1
Lines 798 783 -15
==========================================
- Hits 630 613 -17
- Misses 168 170 +2
Impacted Files | Coverage Δ | |
---|---|---|
tableformatter.py | 78.28% <93.98%> (-0.66%) |
:arrow_down: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 4adb978...3ee1a47. Read the comment docs.
Looks good to me. API changes are relatively minor.
Refactored grid classes to put them in an inheritance hierarchy with an abstract base class at the root.
generate_table() now takes an instance of a Grid class for grid_style instead of a class type.
There is a global DEFAULT_GRID which can be overriden with the set_default_grid() method.
AlternatingRowGrid now takes two optional arguments in its initializer: bg_primary and bg_alternate for the two alternating colors.
Also: