-
Notifications
You must be signed in to change notification settings - Fork 85
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
Remove redefinition of NullHandler #518
Conversation
traits/__init__.py
Outdated
@@ -12,19 +15,6 @@ | |||
# Add a NullHandler so 'traits' loggers don't complain when they get used. | |||
import logging | |||
|
|||
logging.getLogger("traits").addHandler(logging.NullHandler()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
q : why use "traits"
instead of __name__
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More explicit; no need to think hard about whether __name__
might ever possibly have the value "__main__"
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having said that, I don't feel strongly about the change, and the __name__
version has greater copy-and-paste value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM expect for a minor question.
I've changed back to |
Codecov Report
@@ Coverage Diff @@
## master #518 +/- ##
=========================================
Coverage ? 65.31%
=========================================
Files ? 44
Lines ? 7050
Branches ? 1415
=========================================
Hits ? 4605
Misses ? 2022
Partials ? 423
Continue to review full report at Codecov.
|
1 similar comment
Codecov Report
@@ Coverage Diff @@
## master #518 +/- ##
=========================================
Coverage ? 65.31%
=========================================
Files ? 44
Lines ? 7050
Branches ? 1415
=========================================
Hits ? 4605
Misses ? 2022
Partials ? 423
Continue to review full report at Codecov.
|
Some cleanups to the top-level
__init__.py
:NullHandler
is in the standard library since Python 2.7, and we don't support Python 2.6. Remove the redefinition and use the std. lib. version