[Python-Dev] How is the GitHub workflow working for people?
Giampaolo Rodola'
g.rodola at gmail.com
Tue Feb 27 06:49:55 EST 2018
More information about the Python-Dev mailing list
Tue Feb 27 06:49:55 EST 2018
- Previous message (by thread): [Python-Dev] How is the GitHub workflow working for people?
- Next message (by thread): [Python-Dev] How is the GitHub workflow working for people?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I personally use a GIT commit hook which runs flake8 against the *modified py files only* and rejects the commit in case of non-compliance: https://github.com/giampaolo/psutil/blob/master/.git-pre-commit ...I install it via make: https://github.com/giampaolo/psutil/blob/ad4acae5489f86fc3bef645505b3873f156b4867/Makefile#L186 ...and once the whole code base is in a good shape have Travis run flake8 against the whole code base on each commit. When I join an existing project I try to enforce the same workflow and rely on pep8ify (https://github.com/spulec/pep8ify) to adjust the existing code. In order to not be too "strict" I may modify the GIT hook to emit a warning instead of rejecting the commit. On one hand I think it would be great to do the same for cPython. On the other hand I see 2 big downsides: - losing "git blame" history for A LOT of lines of code - even if you're familiar with PEP8 it's sometimes hard to spot non-compliant lines unless you integrate flake8 into your IDE (I do for Sublime); putting such a constraint on contributing users is probably too much and may discourage contributions. On Sun, Feb 25, 2018 at 6:13 AM, Guido van Rossum <guido at python.org> wrote: > It's easy to only analyze the files in the diff (these linters don't do > cross-file analysis anyways, typically) and it's possible to write a filter > that only keeps warnings about lines that are changed, but I don't know of > a standard solution for the latter (places where I worked where I've seen > this always had their own custom implementation). > > On Sat, Feb 24, 2018 at 7:35 PM, Mariatta Wijaya < > mariatta.wijaya at gmail.com> wrote: > >> Can any of these said linters analyze only the diff in the PR, instead of >> the entire CPython codebase? >> >> Mariatta Wijaya >> >> ᐧ >> >> _______________________________________________ >> Python-Dev mailing list >> Python-Dev at python.org >> https://mail.python.org/mailman/listinfo/python-dev >> Unsubscribe: https://mail.python.org/mailman/options/python-dev/guido% >> 40python.org >> >> > > > -- > --Guido van Rossum (python.org/~guido) > > _______________________________________________ > Python-Dev mailing list > Python-Dev at python.org > https://mail.python.org/mailman/listinfo/python-dev > Unsubscribe: https://mail.python.org/mailman/options/python-dev/g. > rodola%40gmail.com > > -- Giampaolo - http://grodola.blogspot.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20180227/97b6457c/attachment-0001.html>
- Previous message (by thread): [Python-Dev] How is the GitHub workflow working for people?
- Next message (by thread): [Python-Dev] How is the GitHub workflow working for people?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list