-
Notifications
You must be signed in to change notification settings - Fork 53
utils: minor code clean up #1800
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
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1800 +/- ##
==========================================
+ Coverage 79.65% 81.13% +1.47%
==========================================
Files 72 73 +1
Lines 25981 26338 +357
Branches 3953 3952 -1
==========================================
+ Hits 20695 21369 +674
- Misses 4449 4806 +357
+ Partials 837 163 -674
... and 47 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
Check that the warning message when a "full model" is over-written is checked.
Avoid using a fully-qualified name when we have the symbol imported anyway. Clean up the use of _clean_model (make more use of it) and add a little documentation.
Given that the message started out with WARNING: we may as well make this a warning rather than an info log message.
3dc9739 to
1619d7b
Compare
|
I agree with the last commit. For my own education, why do you prefer "%s" over |
|
Apart from the three small comments, I think this is good to go; I'll approve once those are resolved. (Please ping if I miss it.) |
|
For #1800 (comment) 👍 For our code I don't think there's really much difference between the two lines but pylint likes to warn about it with it's logging not lazy warning. You can tell it not to warn about the use of f-strings for this (but then I don't understand why they allow this form, which is definitely not lazy, but that's for another day) so we could go with the latter. One "good" thing with this change is that it made me find and fix an issue with our logging override code, but that's been done now, so it's mainly a "style" thing and not something I think we need to codify (i.e. other people don't need to write logging calls like I do). |
Co-authored-by: Hans Moritz Günther <moritz.guenther@gmx.de>
|
Note that the tests fail because I haven't rebased this to include #1807 edited to add or not, it appears. |
Summary
Internal clean up of the sherpa.ui.utils module.
Details
Created when working on something else.
idvalrather thanidfor an internal variable name (although the API usesidso that is left as is)Technically this last one is a user change - it they had used
SherpaVerbosity("WARNING")then the message is now seen when it wasn't before, but I don't think we need to explain this. Or we could also just not take the last commit, where this change is made.Example
CIAO 4.15
This PR