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

Changes typing for logging level to accept both str and int #461

Merged
merged 2 commits into from Dec 3, 2020

Conversation

heavelock
Copy link
Contributor

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.
  • [x ] I accept that @willmcgugan may be pedantic in the code review.

Description

The standard logging module accepts either str or int as a logging level. str is internally casted to int. Rich does not do anything with the logging level so there is no reason to limit the type here.

@codecov
Copy link

codecov bot commented Dec 2, 2020

Codecov Report

Merging #461 (0e201ec) into master (d2fe147) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #461   +/-   ##
=======================================
  Coverage   99.72%   99.72%           
=======================================
  Files          54       54           
  Lines        4654     4654           
=======================================
  Hits         4641     4641           
  Misses         13       13           
Flag Coverage Δ
unittests 99.72% <100.00%> (ø)

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

Impacted Files Coverage Δ
rich/logging.py 100.00% <100.00%> (ø)
rich/pretty.py 100.00% <100.00%> (ø)
rich/prompt.py 100.00% <100.00%> (ø)

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 8a8250c...fbedb8f. Read the comment docs.

rich/logging.py Show resolved Hide resolved
@heavelock
Copy link
Contributor Author

heavelock commented Dec 3, 2020

Black is complaining in CI at file I did not touch and when I am trying to run it on my system it does not complain.

@willmcgugan
Copy link
Collaborator

That's my fault. I'll fix that. Thanks for the PR.

@willmcgugan willmcgugan merged commit 6bfe402 into Textualize:master Dec 3, 2020
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.

None yet

2 participants