Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix initial table headers missing style #954

Closed
wants to merge 3 commits into from
Closed

Fix initial table headers missing style #954

wants to merge 3 commits into from

Conversation

luizyao
Copy link
Contributor

@luizyao luizyao commented Jan 23, 2021

Type of changes

  • Bug fix
  • New feature
  • Documentation / docstrings
  • Tests
  • Other

Checklist

  • I've run the latest black with default args on new code.
  • I've updated CHANGELOG.md and CONTRIBUTORS.md where appropriate.
  • I've added tests for new code.
  • I accept that @willmcgugan may be pedantic in the code review.

Description

Fix issue: #953

When create table with initial "headers" and "header style":

  • If header is a string or a non-style Column object, instead by "header style" above.
table = Table("DATE", Column(_index=1, header="NAME"), header_style="bold red")
table.add_column("AGE")

image

  • If header is a style Column object, keep its own style.
table = Table(
        "DATE",
        Column(_index=0, header="NAME", header_style="bold green"),
        header_style="bold red",
    )
table.add_column("AGE")

image

Create table with initial "headers" and "header style":
- If header is a string or a non-style Column object, instead by "header style" above.
- If header is a style Column object, keep its own style.

close #953
@codecov
Copy link

codecov bot commented Jan 23, 2021

Codecov Report

Merging #954 (dcbd038) into master (8d78671) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #954   +/-   ##
=======================================
  Coverage   99.54%   99.54%           
=======================================
  Files          58       58           
  Lines        5069     5069           
=======================================
  Hits         5046     5046           
  Misses         23       23           
Flag Coverage Δ
unittests 99.54% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


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 3a8ab02...dcbd038. Read the comment docs.

@willmcgugan
Copy link
Collaborator

Thanks, but I had already fixed this. Please try v9.9.0

@luizyao luizyao deleted the fix-953 branch January 24, 2021 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants