Original Author: Josh Wilson (@person142) Source: https://github.com/scipy/scipy/blob/main/tools/lint_diff.py Run pycodestyle on the given diff.
(self, diff)
| 51 | return diff |
| 52 | |
| 53 | def run_pycodestyle(self, diff): |
| 54 | """ |
| 55 | Original Author: Josh Wilson (@person142) |
| 56 | Source: |
| 57 | https://github.com/scipy/scipy/blob/main/tools/lint_diff.py |
| 58 | Run pycodestyle on the given diff. |
| 59 | """ |
| 60 | res = subprocess.run( |
| 61 | ['pycodestyle', '--diff', '--config', CONFIG], |
| 62 | input=diff, |
| 63 | stdout=subprocess.PIPE, |
| 64 | encoding='utf-8', |
| 65 | ) |
| 66 | return res.returncode, res.stdout |
| 67 | |
| 68 | def run_lint(self, uncommitted): |
| 69 | diff = self.get_branch_diff(uncommitted) |