Re: [libvirt] [PATCH] maint: Use pep8 to implement sc_prohibit_semicolon_at_eol_in_python

2019-09-12 Thread shi_...@massclouds.com
>On Thu, Sep 12, 2019 at 10:05:34AM -0400, Cole Robinson wrote: >> On 9/12/19 9:18 AM, Andrea Bolognani wrote: >> > On Thu, 2019-09-12 at 12:00 +0100, Daniel P. Berrangé wrote: >> >> On Thu, Sep 12, 2019 at 12:56:04PM +0200, Andrea Bolognani wrote: >> >>> FWIW, libvirt-dbus is using flake8 to

Re: [libvirt] [PATCH] maint: Use pep8 to implement sc_prohibit_semicolon_at_eol_in_python

2019-09-12 Thread Daniel P . Berrangé
On Thu, Sep 12, 2019 at 10:05:34AM -0400, Cole Robinson wrote: > On 9/12/19 9:18 AM, Andrea Bolognani wrote: > > On Thu, 2019-09-12 at 12:00 +0100, Daniel P. Berrangé wrote: > >> On Thu, Sep 12, 2019 at 12:56:04PM +0200, Andrea Bolognani wrote: > >>> FWIW, libvirt-dbus is using flake8 to achieve

Re: [libvirt] [PATCH] maint: Use pep8 to implement sc_prohibit_semicolon_at_eol_in_python

2019-09-12 Thread Cole Robinson
On 9/12/19 9:18 AM, Andrea Bolognani wrote: > On Thu, 2019-09-12 at 12:00 +0100, Daniel P. Berrangé wrote: >> On Thu, Sep 12, 2019 at 12:56:04PM +0200, Andrea Bolognani wrote: >>> FWIW, libvirt-dbus is using flake8 to achieve what I believe is >>> basically the same result, whereas virt-manager I

Re: [libvirt] [PATCH] maint: Use pep8 to implement sc_prohibit_semicolon_at_eol_in_python

2019-09-12 Thread Andrea Bolognani
On Thu, 2019-09-12 at 12:00 +0100, Daniel P. Berrangé wrote: > On Thu, Sep 12, 2019 at 12:56:04PM +0200, Andrea Bolognani wrote: > > FWIW, libvirt-dbus is using flake8 to achieve what I believe is > > basically the same result, whereas virt-manager I think uses pylint > > and pycodestlye. > > > >

Re: [libvirt] [PATCH] maint: Use pep8 to implement sc_prohibit_semicolon_at_eol_in_python

2019-09-12 Thread Daniel P . Berrangé
On Thu, Sep 12, 2019 at 12:56:04PM +0200, Andrea Bolognani wrote: > On Thu, 2019-09-12 at 11:13 +0100, Daniel P. Berrangé wrote: > > On Thu, Sep 12, 2019 at 05:55:38PM +0800, Shi Lei wrote: > > > +AC_PATH_PROG([PEP8], [pep8]) > > > +if test -z "$PEP8"; then > > > +AC_MSG_ERROR(['pep8' binary

Re: [libvirt] [PATCH] maint: Use pep8 to implement sc_prohibit_semicolon_at_eol_in_python

2019-09-12 Thread Andrea Bolognani
On Thu, 2019-09-12 at 11:13 +0100, Daniel P. Berrangé wrote: > On Thu, Sep 12, 2019 at 05:55:38PM +0800, Shi Lei wrote: > > +AC_PATH_PROG([PEP8], [pep8]) > > +if test -z "$PEP8"; then > > +AC_MSG_ERROR(['pep8' binary is required to check python code style]) > > +fi > > Using pep8 is an

Re: [libvirt] [PATCH] maint: Use pep8 to implement sc_prohibit_semicolon_at_eol_in_python

2019-09-12 Thread Daniel P . Berrangé
On Thu, Sep 12, 2019 at 05:55:38PM +0800, Shi Lei wrote: > Now sc_prohibit_semicolon_at_eol_in_python can't handle semicolon > within multiline strings(comments) properly. > > I suggest that we could use pep8 to check python code style error, such > as 'statement ends with a semicolon'. In

[libvirt] [PATCH] maint: Use pep8 to implement sc_prohibit_semicolon_at_eol_in_python

2019-09-12 Thread Shi Lei
Now sc_prohibit_semicolon_at_eol_in_python can't handle semicolon within multiline strings(comments) properly. I suggest that we could use pep8 to check python code style error, such as 'statement ends with a semicolon'. In future, we could use '--select' to introduce other rules. Signed-off-by: