| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Add optional PEP8_VALIDATE env flag for running prettier output from tests into pycodestyle. If pycodestyle returns any errors, the test fails. Adds pycodestyle as a vendor dependency. Several tests currently fail with the PEP8_VALIDATE flag enabled. Proof of concept for prettier#1.
|
This looks great to me! I think that having this option, even if it's not on or enforced by default, makes it a lot easier to start tracking down and fixing inconsistencies/issues as we start to get more feature complete. I'd be in favor of merging this in :D |
Sorry, something went wrong.
|
@patrick91 Do you have any feedback for this PR? |
Sorry, something went wrong.
|
@ryanashcraft I'm so sorry for the delay, I've been busy with PyCon Italia and other things, the PR looks great! I'll merge it and we can enable pycodestyle on CI later |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Proof of concept for #1. Curious if others think this is actually useful or not.
Add optional support for a PEP8_VALIDATE env flag for running prettier output from tests into pycodestyle. If pycodestyle returns any errors, the test fails. There is no impact if the PEP8_VALIDATE flag is not set.
I did my best choosing an appropriate subset of pycodestyle errors, but it will likely will need more tweaking.
Adds pycodestyle as a vendor dependency.
Several tests currently fail with the PEP8_VALIDATE flag enabled:
Click to view outputSummary of all failing tests FAIL tests/python_comments/jsfmt.spec.js ● comments.py - python-verify expect(received).toEqual(expected) Expected value to equal: "" Received: "stdin:1:6: E261 at least two spaces before inline comment " at Object.test (tests_config/run_spec.js:46:63) at new Promise (<anonymous>) at <anonymous> at process._tickCallback (internal/process/next_tick.js:188:7) ● comments.py - python-verify expect(received).toEqual(expected) Expected value to equal: "" Received: "stdin:1:6: E261 at least two spaces before inline comment " at Object.test (tests_config/run_spec.js:46:63) at new Promise (<anonymous>) at <anonymous> at process._tickCallback (internal/process/next_tick.js:188:7) FAIL tests/python_expressions/jsfmt.spec.js ● expressions.py - python-verify expect(received).toEqual(expected) Expected value to equal: "" Received: "stdin:37:4: E231 missing whitespace after ',' stdin:110:11: E203 whitespace before ':' stdin:334:18: E231 missing whitespace after ',' " at Object.test (tests_config/run_spec.js:46:63) at new Promise (<anonymous>) at <anonymous> at process._tickCallback (internal/process/next_tick.js:188:7) ● expressions.py - python-verify expect(received).toEqual(expected) Expected value to equal: "" Received: "stdin:37:4: E231 missing whitespace after ',' stdin:110:11: E203 whitespace before ':' stdin:334:18: E231 missing whitespace after ',' " at Object.test (tests_config/run_spec.js:46:63) at new Promise (<anonymous>) at <anonymous> at process._tickCallback (internal/process/next_tick.js:188:7) FAIL tests/python_tuple/jsfmt.spec.js ● tuple.py - python-verify expect(received).toEqual(expected) Expected value to equal: "" Received: "stdin:13:4: E231 missing whitespace after ',' stdin:14:4: E231 missing whitespace after ',' " at Object.test (tests_config/run_spec.js:46:63) at new Promise (<anonymous>) at <anonymous> at process._tickCallback (internal/process/next_tick.js:188:7) ● tuple.py - python-verify expect(received).toEqual(expected) Expected value to equal: "" Received: "stdin:13:4: E231 missing whitespace after ',' stdin:14:4: E231 missing whitespace after ',' " at Object.test (tests_config/run_spec.js:46:63) at new Promise (<anonymous>) at <anonymous> at process._tickCallback (internal/process/next_tick.js:188:7) ● tuple.py - python-verify expect(received).toEqual(expected) Expected value to equal: "" Received: "stdin:13:4: E231 missing whitespace after ',' stdin:14:4: E231 missing whitespace after ',' " at Object.test (tests_config/run_spec.js:46:63) at new Promise (<anonymous>) at <anonymous> at process._tickCallback (internal/process/next_tick.js:188:7) FAIL tests/python_strings/jsfmt.spec.js ● strings.py - python-verify expect(received).toEqual(expected) Expected value to equal: "" Received: "stdin:43:1: E265 block comment should start with '# ' " at Object.test (tests_config/run_spec.js:46:63) at new Promise (<anonymous>) at <anonymous> at process._tickCallback (internal/process/next_tick.js:188:7) ● strings.py - python-verify expect(received).toEqual(expected) Expected value to equal: "" Received: "stdin:43:1: E265 block comment should start with '# ' " at Object.test (tests_config/run_spec.js:46:63) at new Promise (<anonymous>) at <anonymous> at process._tickCallback (internal/process/next_tick.js:188:7) FAIL tests/python_lambdas/jsfmt.spec.js ● lambdas.py - python-verify expect(received).toEqual(expected) Expected value to equal: "" Received: "stdin:4:9: E126 continuation line over-indented for hanging indent stdin:6:9: E126 continuation line over-indented for hanging indent stdin:8:47: E203 whitespace before ':' stdin:9:5: E131 continuation line unaligned for hanging indent " at Object.test (tests_config/run_spec.js:46:63) at new Promise (<anonymous>) at <anonymous> at process._tickCallback (internal/process/next_tick.js:188:7) ● lambdas.py - python-verify expect(received).toEqual(expected) Expected value to equal: "" Received: "stdin:4:9: E126 continuation line over-indented for hanging indent stdin:6:9: E126 continuation line over-indented for hanging indent stdin:9:5: E131 continuation line unaligned for hanging indent " at Object.test (tests_config/run_spec.js:46:63) at new Promise (<anonymous>) at <anonymous> at process._tickCallback (internal/process/next_tick.js:188:7) ● lambdas.py - python-verify expect(received).toEqual(expected) Expected value to equal: "" Received: "stdin:4:9: E126 continuation line over-indented for hanging indent stdin:6:9: E126 continuation line over-indented for hanging indent stdin:8:47: E203 whitespace before ':' stdin:9:5: E131 continuation line unaligned for hanging indent " at Object.test (tests_config/run_spec.js:46:63) at new Promise (<anonymous>) at <anonymous> at process._tickCallback (internal/process/next_tick.js:188:7) FAIL tests/python_long/jsfmt.spec.js ● hello.py - python-verify expect(received).toEqual(expected) Expected value to equal: "" Received: "stdin:1:1: E302 expected 2 blank lines, found 0 " at Object.test (tests_config/run_spec.js:46:63) at new Promise (<anonymous>) at <anonymous> at process._tickCallback (internal/process/next_tick.js:188:7) ● hello.py - python-verify expect(received).toEqual(expected) Expected value to equal: "" Received: "stdin:1:1: E302 expected 2 blank lines, found 0 " at Object.test (tests_config/run_spec.js:46:63) at new Promise (<anonymous>) at <anonymous> at process._tickCallback (internal/process/next_tick.js:188:7) ● hello.py - python-verify expect(received).toEqual(expected) Expected value to equal: "" Received: "stdin:1:1: E302 expected 2 blank lines, found 0 " at Object.test (tests_config/run_spec.js:46:63) at new Promise (<anonymous>) at <anonymous> at process._tickCallback (internal/process/next_tick.js:188:7) Test Suites: 6 failed, 118 passed, 124 total Tests: 15 failed, 165 passed, 180 total Snapshots: 113 passed, 113 total Time: 12.275s Ran all test suites in 2 projects.