[libcamera-devel] [PATCH 1/2] checkstyle: Move from pep8 to pycodestyle
Nicolas Dufresne
nicolas at ndufresne.ca
Fri Jan 17 01:50:27 CET 2020
Le jeudi 16 janvier 2020 à 22:00 +0000, Kieran Bingham a écrit :
> Hi Nicolas,
>
> Thank you for the patch
>
> On 16/01/2020 18:26, nicolas at ndufresne.ca wrote:
> > From: Nicolas Dufresne <nicolas.dufresne at collabora.com>
> >
> > The tool has been renamed in 2016 to make it more obvious what it
> > is doing. There is no other changes needed on our side.
> >
> > See https://github.com/PyCQA/pycodestyle/issues/466
>
> Sounds good to me, and the updated naming is available on my system at
> least.
>
> > Signed-off-by: Nicolas Dufresne <nicolas.dufresne at collabora.com>
>
> Except for the mode change, which prevents me executing the script from
> the command line...
That's is really weird, since it's still executable on my machine. It
smells like a pretty wrong git settings, need to search that up. I got
a fresh installed system, so loads of things to reconfigure, I didn't
expect this one though.
Anyway, will be fixed in the version.
>
> Reviewed-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
>
> > ---
> > utils/checkstyle.py | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> > mode change 100755 => 100644 utils/checkstyle.py
>
> Something happened here... The mode changed?
>
> That prevented me from executing the script...
>
> > diff --git a/utils/checkstyle.py b/utils/checkstyle.py
> > old mode 100755
> > new mode 100644
> > index 93f0291..7edea25
> > --- a/utils/checkstyle.py
> > +++ b/utils/checkstyle.py
> > @@ -321,10 +321,10 @@ class Pep8Checker(StyleChecker):
> > data = ''.join(self.__content).encode('utf-8')
> >
> > try:
> > - ret = subprocess.run(['pep8', '--ignore=E501', '-'],
> > + ret = subprocess.run(['pycodestyle', '--ignore=E501', '-'],
> > input=data, stdout=subprocess.PIPE)
> > except FileNotFoundError:
> > - issues.append(StyleIssue(0, None, "Please install pep8 to validate python additions"))
> > + issues.append(StyleIssue(0, None, "Please install pycodestyle to validate python additions"))
> > return issues
> >
> > results = ret.stdout.decode('utf-8').splitlines()
> >
More information about the libcamera-devel
mailing list