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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.
> > 
> > I am not familiar enough with the Python ecosystem to be able to
> > compare the various linters, but it would IMHO make sense to at
> > least try to standardize on one or more of them and use them across
> > libvirt-related projects.
> 
> pep8 validates code style against published PEP style guidelines.
> 
> pyflakes does static analysis to detect code errors
> 
> flake8 is a wrapper that runs pep8 and pyflakes and does some
> other stuff.
> 
> For just doing this semicolon check then pep8 is sufficient,
> but for a more general approach, then flake8 makes more
> sense. In that case we'd delete sc_prohibit_semicolon_at_eol_in_python
> entirely, and simply have a generic 'sc_flake8' check that runs a
> configured list of checks against all py code.

Yeah, the more general approach makes sense to me, so I would go
that route directly instead of introducing pep8 first and only then
moving to flake8.

-- 
Andrea Bolognani / Red Hat / Virtualization

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux