No description provided.
Enable W191 indentation contains tabs and W291 trailing whitespace flake8 checks for Python files #13210
pull jbampton wants to merge 1 commits into bitcoin:master from jbampton:remove-whitespace changing 13 files +413 −411-
jbampton commented at 3:31 PM on May 10, 2018: contributor
- laanwj added the label Refactoring on May 10, 2018
-
in contrib/linearize/linearize-data.py:173 in d357e36382 outdated
169 | @@ -170,7 +170,7 @@ def writeBlock(self, inhdr, blk_hdr, rawblock): 170 | self.highTS = blkTS 171 | 172 | if (self.blkCountOut % 1000) == 0: 173 | - print('%i blocks scanned, %i blocks written (of %i, %.1f%% complete)' % 174 | + print('%i blocks scanned, %i blocks written (of %i, %.1f%% complete)' %
laanwj commented at 3:55 PM on May 10, 2018:Looks like the travis linter fails here, because tabs are used instead of spaces for indenting. Which was already the case. To match the style of the other files, I think you'd need to change tabs to four spaces throughout the file.
practicalswift commented at 4:13 PM on May 10, 2018: contributorConcept ACK :+1:
For reviewers – use
?w=1to review ignoring whitespace changes.To make this improvement persistent, please enable the
W291check inlint-python.sh. That will make Travis catch any regressions.Suggested patch:
diff --git a/contrib/devtools/lint-python.sh b/contrib/devtools/lint-python.sh index 2393370..affbdea 100755 --- a/contrib/devtools/lint-python.sh +++ b/contrib/devtools/lint-python.sh @@ -61,6 +61,7 @@ # F823 local variable name … referenced before assignment # F831 duplicate argument name in function definition # F841 local variable 'foo' is assigned to but never used +# W291 trailing whitespace # W292 no newline at end of file # W293 blank line contains whitespace # W504 line break after binary operator @@ -71,4 +72,4 @@ # W605 invalid escape sequence "x" # W606 'async' and 'await' are reserved keywords starting with Python 3.7 -flake8 --ignore=B,C,E,F,I,N,W --select=E112,E113,E115,E116,E125,E131,E133,E223,E224,E242,E266,E271,E272,E273,E274,E275,E304,E306,E401,E402,E502,E701,E702,E703,E714,E721,E741,E742,E743,F401,E901,E902,F402,F404,F406,F407,F601,F602,F621,F622,F631,F701,F702,F703,F704,F705,F706,F707,F811,F812,F821,F822,F823,F831,F841,W292,W293,W504,W601,W602,W603,W604,W605,W606 . +flake8 --ignore=B,C,E,F,I,N,W --select=E112,E113,E115,E116,E125,E131,E133,E223,E224,E242,E266,E271,E272,E273,E274,E275,E304,E306,E401,E402,E502,E701,E702,E703,E714,E721,E741,E742,E743,F401,E901,E902,F402,F404,F406,F407,F601,F602,F621,F622,F631,F701,F702,F703,F704,F705,F706,F707,F811,F812,F821,F822,F823,F831,F841,W291,W292,W293,W504,W601,W602,W603,W604,W605,W606 .Nice first-time contribution!
MarcoFalke commented at 4:57 PM on May 10, 2018: memberPlease squash your commits according to https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md#squashing-commits
promag commented at 5:22 PM on May 10, 2018: member👍 @practicalswift suggestion as a 2nd commit.
promag commented at 5:24 PM on May 10, 2018: memberThese commits could be script diffs?
jbampton force-pushed on May 10, 2018promag commented at 5:26 PM on May 10, 2018: member@MarcoFalke why squash? These are independent unrelated. PR title could be improved.
promag commented at 5:29 PM on May 10, 2018: memberSorry for the spam 👼 add Indentation contains tabs (W191) to lint?
jbampton renamed this:Trivial: Remove trailing whitespace from Python files
Enable W291 trailing whitespace flake8 check for Python files
on May 10, 2018jbampton commented at 6:09 PM on May 10, 2018: contributorSquashed and PR title has been updated now. 👍
jbampton force-pushed on May 10, 20180d31ef4762Enable W191 and W291 flake8 checks.
Remove trailing whitespace from Python files. Convert tabs to spaces.
jbampton force-pushed on May 10, 2018jbampton renamed this:Enable W291 trailing whitespace flake8 check for Python files
Enable W191 indentation contains tabs and W291 trailing whitespace flake8 checks for Python files
on May 10, 2018promag commented at 10:52 PM on May 10, 2018: memberTested ACK 0d31ef4.
MarcoFalke commented at 12:58 AM on May 11, 2018: memberutACK 0d31ef4762f5a1428a57439d26551a99f15ddc2e
MarcoFalke merged this on May 11, 2018MarcoFalke closed this on May 11, 2018MarcoFalke referenced this in commit 81d0d565ab on May 11, 2018jbampton deleted the branch on May 11, 2018UdjinM6 referenced this in commit f7ebbe67f5 on Jul 29, 2020UdjinM6 referenced this in commit 1aeee2faea on Jul 29, 2020PastaPastaPasta referenced this in commit 18eebe5251 on Jul 29, 2020MarcoFalke locked this on Sep 8, 2021ContributorsLabels
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-22 06:15 UTC
More mirrored repositories can be found on mirror.b10c.me