Skip to content
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

Fixes #5529: Print python lint errors at the end of the check #6005

Merged
merged 2 commits into from
Dec 22, 2018

Conversation

apb7
Copy link
Contributor

@apb7 apb7 commented Dec 19, 2018

Explanation

Fixes #5529.
Redirects the output from stdout to a temporary stream using context manager as suggested by @seanlip here. This stream is later used to retrieve the output and put in result queue.

Checklist

  • The PR title starts with "Fix #bugnum: ", followed by a short, clear summary of the changes. (If this PR fixes part of an issue, prefix the title with "Fix part of #bugnum: ...".)
  • The PR explanation includes the words "Fixes #bugnum: ..." (or "Fixes part of #bugnum" if the PR only partially fixes an issue).
  • The linter/Karma presubmit checks have passed.
    • These should run automatically, but if not, you can manually trigger them locally using python scripts/pre_commit_linter.py and bash scripts/run_frontend_tests.sh.
  • The PR is made from a branch that's not called "develop".
  • The PR follows the style guide.
  • The PR is assigned to an appropriate reviewer.
    • If you're a new contributor, please ask on Gitter for someone to assign a reviewer.
    • If you're not sure who the appropriate reviewer is, please assign to the issue's "owner" -- see the "talk-to" label on the issue.

@codecov-io
Copy link

codecov-io commented Dec 19, 2018

Codecov Report

Merging #6005 into develop will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           develop   #6005   +/-   ##
=======================================
  Coverage     45.3%   45.3%           
=======================================
  Files          520     520           
  Lines        30667   30667           
  Branches      4597    4597           
=======================================
  Hits         13893   13893           
  Misses       16774   16774
Impacted Files Coverage Δ
...xploration_player/ExplorationPlayerStateService.js 1.53% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 85057a7...6e3c88f. Read the comment docs.

Copy link
Contributor

@kevinlee12 kevinlee12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @apb7, just a nit!

scripts/pre_commit_linter.py Outdated Show resolved Hide resolved
@kevinlee12 kevinlee12 assigned apb7 and unassigned kevinlee12 Dec 21, 2018
@apb7 apb7 assigned kevinlee12 and unassigned apb7 Dec 21, 2018
Copy link
Contributor

@kevinlee12 kevinlee12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

sending this to @seanlip and @BenHenning for code owner review.

@kevinlee12 kevinlee12 assigned seanlip and BenHenning and unassigned kevinlee12 Dec 22, 2018
Copy link
Contributor

@nithusha21 nithusha21 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Just one confirmation.

pycodestyle_report = style_guide.check_files(
paths=current_files_to_lint)
# This line prints Pycodestyle's output to the console.
pycodestyle_report.print_statistics()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line seems to be missing below. Is this intentional?

@apb7
Copy link
Contributor Author

apb7 commented Dec 22, 2018 via email

@apb7 apb7 merged commit 5481b28 into oppia:develop Dec 22, 2018
@apb7 apb7 deleted the fix-5529 branch December 22, 2018 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Print lint check error messages at the end of the check
6 participants