All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Snow <jsnow@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>, qemu-devel@nongnu.org
Cc: "Fam Zheng" <fam@euphon.net>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Thomas Huth" <thuth@redhat.com>,
	"Daniel P . Berrangé" <berrange@redhat.com>,
	"Eduardo Habkost" <ehabkost@redhat.com>,
	"Markus Armbruster" <armbru@redhat.com>,
	"Wainer dos Santos Moschetta" <wainersm@redhat.com>,
	"Cleber Rosa" <crosa@redhat.com>,
	"Alex Bennée" <alex.bennee@linaro.org>
Subject: Re: [PATCH 2/5] python: add excluded dirs to flake8 config
Date: Wed, 28 Oct 2020 09:42:36 -0400	[thread overview]
Message-ID: <4efc2369-0dbe-238e-a4c4-8897a75e76ca@redhat.com> (raw)
In-Reply-To: <da8e8e7f-18cb-7fc1-955f-c3f73d9a3260@redhat.com>

On 10/28/20 4:50 AM, Philippe Mathieu-Daudé wrote:
> On 10/27/20 11:38 PM, John Snow wrote:
>> Following patches make obvious that we ought to ignore certain
>> directories to avoid wildly erroneous flake8 output.
>>
>> Signed-off-by: John Snow <jsnow@redhat.com>
>> ---
>>   python/setup.cfg | 2 ++
>>   1 file changed, 2 insertions(+)
>>
>> diff --git a/python/setup.cfg b/python/setup.cfg
>> index cb696291ba38..d0ad683b5148 100644
>> --- a/python/setup.cfg
>> +++ b/python/setup.cfg
>> @@ -30,6 +30,8 @@ devel =
>>   
>>   [flake8]
>>   extend-ignore = E722  # Prefer pylint's bare-except checks to flake8's
>> +exclude = __pycache__,
>> +          .venv,
> 
> Can we make flake8 aware the files are in a git repository instead?
> 

Long story short, no.

Python tooling copies source out of git for many reasons -- during 
installation, packaging, etc -- and it loses git metadata.

This is why I have a VERSION file in this directory, too. I have no 
access to the git tags from within the python packaging ecosystem.

--js

> Anyway,
> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> 
>>   
>>   [mypy]
>>   strict = True
>>
> 



  reply	other threads:[~2020-10-28 13:44 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-27 22:38 [PATCH 0/5] python: add linters to gitlab CI John Snow
2020-10-27 22:38 ` [PATCH 1/5] python: add pytest and tests John Snow
2020-10-28  6:19   ` Thomas Huth
2020-10-28 13:23     ` John Snow
2020-10-28 14:09       ` Philippe Mathieu-Daudé
2020-10-28 14:54       ` Thomas Huth
2020-10-28 18:38         ` John Snow
2020-10-27 22:38 ` [PATCH 2/5] python: add excluded dirs to flake8 config John Snow
2020-10-28  8:50   ` Philippe Mathieu-Daudé
2020-10-28 13:42     ` John Snow [this message]
2020-10-27 22:38 ` [PATCH 3/5] python: add Makefile for some common tasks John Snow
2020-10-27 22:38 ` [PATCH 4/5] python: add .gitignore John Snow
2020-10-28  8:13   ` Thomas Huth
2020-10-28  9:16     ` Markus Armbruster
2020-10-28  9:22       ` Daniel P. Berrangé
2020-10-28 13:39       ` John Snow
2020-10-28 13:41         ` Daniel P. Berrangé
2020-10-28 13:26     ` John Snow
2020-10-28 18:33     ` John Snow
2020-10-27 22:38 ` [PATCH 5/5] gitlab: add python linters to CI John Snow

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4efc2369-0dbe-238e-a4c4-8897a75e76ca@redhat.com \
    --to=jsnow@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=crosa@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=fam@euphon.net \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.com \
    --cc=wainersm@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.