Fix all logging to use %-interpolation and not .format, sort imports in touched files, add pylint-ing for % formatting in log messages to tox -e lint - #7118
Conversation
|
@yarikoptic I've fixed all occurrences of the W1202 lint. |
tox -e linttox -e lint
Still happens in some busy environments, like recently within https://app.travis-ci.com/github/datalad/datalad/jobs/586725682 of datalad#7118
|
travis -- filed #7126 and restarted , appveyor -- looked like some ssh issue restarted |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## maint #7118 +/- ##
==========================================
+ Coverage 89.37% 90.93% +1.56%
==========================================
Files 355 355
Lines 46498 46506 +8
Branches 6327 6327
==========================================
+ Hits 41559 42292 +733
+ Misses 4924 4199 -725
Partials 15 15 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
For the W1202: Use lazy % or % formatting in logging functions (logging-format-interpolation) which I believe nobody would doubt to be a good thing to do [appveyor skip] [travis skip]
Use lazy % or % formatting in logging functions (logging-format-interpolation)
1d6461d to
a6b39dd
Compare
bpoldrack
left a comment
There was a problem hiding this comment.
Generally, looks good to me.
But why maint? Seems to me it would be easier to resolve in master (for example metadata removal).
because it is a bug to use so if there was a log line which had this already, might have triggered that condition. |
BTW IMHO it is a bit misleading to name it "removal" -- it is a "move to -deprecated" so not really "fire and forget", and indeed it would cause conflicts and then lack of similar fix in deprecated since most likely people just would not care to fix it there, although that code would still be there and might even be used by some. But that is ok |
|
another reason -- to avoid lingering merge conflicts from anyways -- if no strong objections, I would prefer to merge tomorrow and proceed with preparing merge into master. |
|
Ok, let's proceed then. |
|
PR released in |
#7117 made me look into tightening our automated linting. Adding pylinting for a single warning/error to start with:
which I believe nobody would doubt to be a good thing to do.
pylintdidn't warn about that :-/ )[appveyor skip]
[travis skip]
edit: had to cancel appveyor manually -- for some reason it ignored the annotation I gave