Perfect your code
With built-in code review tools, GitHub makes it easy to raise the quality bar before you ship. Join the 36 million developers who've merged over 200 million pull requests.
Sign up for free See pricing for teams and enterprisesbuild,python: update flake8 rules #25614
Conversation
refack
requested a review
from joyeecheung
Jan 21, 2019
This comment has been minimized.
This comment has been minimized.
nodejs-github-bot
added
the
test
label
Jan 21, 2019
This was referenced Jan 21, 2019
thefourtheye
approved these changes
Jan 21, 2019
This comment has been minimized.
This comment has been minimized.
|
We skip markdown and JS linting for the fixtures folder, I don't see why we should not do the same for python? |
This comment has been minimized.
This comment has been minimized.
|
This is not a style violation, this is an undefined name that has the potential to raise a NameError at runtime that would halt the script. Why would we want to miss the opportunity to flatten such a "showstopper" issue? E901,E999,F821,F822,F823 are the "showstopper" flake8 issues that can halt the runtime with a SyntaxError, NameError, etc. Most other flake8 issues are merely "style violations" -- useful for readability but they do not effect runtime safety.
|
joyeecheung
reviewed
Jan 21, 2019
|
I don't think we should float patches in the |
This comment has been minimized.
This comment has been minimized.
|
What is upstream? We might not want to maintain these scripts but we do not want them to fail on our users. |
This comment has been minimized.
This comment has been minimized.
|
@joyeecheung web-platform-tests/wpt#14973 is merged in the upstream. Do we have a specific procedure to pull changes from wpt or this PR should be fine? |
This comment has been minimized.
This comment has been minimized.
Upstream means https://github.com/web-platform-tests/wpt - the files under
We do maintain a map of the commit sha for each subset, see the README of test/wpt: https://github.com/nodejs/node/tree/master/test/wpt#how-to-update-tests-for-a-module For But I still think we should just ignore |
This comment has been minimized.
This comment has been minimized.
As I see it, for CPP, markdown, and JS our linters are just for style, and we get actual code coverage with our test suite. For python we can lint for syntax and semantic issues. Also AFAIU we skip |
refack
referenced this pull request
Jan 22, 2019
Merged
build: do not lint python scripts under test/fixtures #25639
refack
added
the
blocked
label
Jan 22, 2019
This comment has been minimized.
This comment has been minimized.
|
blocked by: #25639 |
refack
added
build
python
labels
Jan 22, 2019
refack
force-pushed the
refack:float-patch-wpt
branch
from
36f30fc
to
7c7d86d
Jan 22, 2019
refack
changed the title
test,tools: float python3 patch on WPT fixtures
build,python: restore python linting of test/fixtures
Jan 22, 2019
refack
removed
the
blocked
label
Jan 22, 2019
This comment has been minimized.
This comment has been minimized.
|
Rebased on master and latest WPT. Now this PR restores linting of |
This comment has been minimized.
This comment has been minimized.
|
@refack I am still -1 to lint |
This comment has been minimized.
This comment has been minimized.
Makes sense. I am okay with not linting Python scripts in test/fixtures.
As we don't control upstream, if they add code which fails our python linter, we have to update it. That adds to our maintenance. We don't have to do that, right? |
This comment has been minimized.
This comment has been minimized.
|
Is it best practice to be caught unaware when syntax errors come into our codebase? We might not control upstream but they certainly seem to react quickly when we alert them to issues in their code. My sense is that the vigilance demonstrated in web-platform-tests/wpt#14973 is a way for us to give back to those projects that we rely on. They help us and we should be willing to help them. |
This comment has been minimized.
This comment has been minimized.
|
@cclauss We always ignore |
cclauss
referenced this pull request
Jan 29, 2019
Open
build: ongoing list of actions for Python 3 compatibility #25789
refack
force-pushed the
refack:float-patch-wpt
branch
from
7c7d86d
to
419441e
Apr 11, 2019
refack
dismissed
joyeecheung’s
stale review
Apr 11, 2019
Relevant changes where updated
refack
requested a review
from joyeecheung
Apr 12, 2019
This comment has been minimized.
This comment has been minimized.
cclauss
reviewed
Apr 13, 2019
.flake8 Outdated
refack
force-pushed the
refack:float-patch-wpt
branch
from
8a7402f
to
1d1c80f
Apr 13, 2019
This comment has been minimized.
This comment has been minimized.
refack
force-pushed the
refack:float-patch-wpt
branch
from
1d1c80f
to
7ac5415
Apr 13, 2019
This comment has been minimized.
This comment has been minimized.
refack
added some commits
Apr 11, 2019
refack
force-pushed the
refack:float-patch-wpt
branch
from
7ac5415
to
1fc4255
Apr 14, 2019
This comment has been minimized.
This comment has been minimized.
|
Landed in 914d6c9...1fc4255 |


refack commentedJan 21, 2019
•
edited
xrangedoes not exist in python3 hence it's lint blocking nodejs/build#1631, but it is not used in our codebase.As I see it we have 3 options to unblock:
node/Makefile
Lines 1294 to 1297 in f698386
Personally, I prefer option 1.
/CC @nodejs/testing @nodejs/python
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes