Loading pre_commit_pylint.py +2 −14 Original line number Diff line number Diff line Loading @@ -26,21 +26,13 @@ __version__ = '0.3' multiple=True, help="The names of optional requirements sets to install", ) @click.option( '--fail-under', '-f', default=10.0, type=float, help=""" If the score is below the given threshold a non-zero exit code will be returned """, ) @click.option( '--editable/--non-editable', default=isfile('setup.py'), help="Use the editable install (develop) feature provided by setuptools", ) @click.argument('pylint-options', nargs=-1, type=click.UNPROCESSED) def main(extras, fail_under, editable, pylint_options): def main(extras, editable, pylint_options): """Invoke Pylint on the given files after ensuring dependencies are up to date""" join = ','.join cmd = ['pip', 'install', '--upgrade'] Loading @@ -61,11 +53,7 @@ def main(extras, fail_under, editable, pylint_options): sys.stderr.write(exc.stderr) sys.exit(3) run = lint.Run(list(pylint_options), do_exit=False) score = run.linter.stats['global_note'] if score < fail_under: sys.exit(1) lint.Run(list(pylint_options)) if __name__ == '__main__': Loading Loading
pre_commit_pylint.py +2 −14 Original line number Diff line number Diff line Loading @@ -26,21 +26,13 @@ __version__ = '0.3' multiple=True, help="The names of optional requirements sets to install", ) @click.option( '--fail-under', '-f', default=10.0, type=float, help=""" If the score is below the given threshold a non-zero exit code will be returned """, ) @click.option( '--editable/--non-editable', default=isfile('setup.py'), help="Use the editable install (develop) feature provided by setuptools", ) @click.argument('pylint-options', nargs=-1, type=click.UNPROCESSED) def main(extras, fail_under, editable, pylint_options): def main(extras, editable, pylint_options): """Invoke Pylint on the given files after ensuring dependencies are up to date""" join = ','.join cmd = ['pip', 'install', '--upgrade'] Loading @@ -61,11 +53,7 @@ def main(extras, fail_under, editable, pylint_options): sys.stderr.write(exc.stderr) sys.exit(3) run = lint.Run(list(pylint_options), do_exit=False) score = run.linter.stats['global_note'] if score < fail_under: sys.exit(1) lint.Run(list(pylint_options)) if __name__ == '__main__': Loading