[lago-devel] yapf and flake8 are running against each other - and my patch is in the middle.

Nadav Goldin ngoldin at redhat.com
Tue Nov 22 12:41:31 UTC 2016


To make a long story short, this change[1] in flake8 allowed
pycodestyle 2.2.0(formerly known as pep8) to be used, which in its
turn was not behaving nicely with our current yapf installation.
Instead of seeking where/why/how we can keep the old versions, I
updated to a new yapf version(0.14.0, we were using 0.7.1), which seem
to also make the code look a bit better.

Once [2] hopefully passes CI and merged, rebase on master and update
the yapf version:
pip install --upgrade yapf
(pip is how the automation script installs it too, so no RPM needed),
hopefully this will solve it.


[1] http://flake8.pycqa.org/en/latest/release-notes/3.2.0.html
[2] https://github.com/lago-project/lago/pull/367

On Tue, Nov 22, 2016 at 9:52 AM, Nadav Goldin <ngoldin at redhat.com> wrote:
>
> Seems again like a new issue with flake8 version, I'm working on it.
>
>
>
>
>
>
> On Tue, Nov 22, 2016 at 9:45 AM, Yaniv Kaul <ykaul at redhat.com> wrote:
>>
>> Seems like there's a disagreement between yapf and flake on styling.
>> See http://jenkins.ovirt.org/job/lago_master_check-patch-el7-x86_64/362/console and
>> http://jenkins.ovirt.org/job/lago_master_check-patch-el7-x86_64/361/console  :
>>
>>
>> 7:24:57 scripts/check_style.sh
>> 07:24:57 yapf 0.7.1
>> 07:25:59 --- lago/templates.py (original)
>> 07:25:59 +++ lago/templates.py (reformatted)
>> 07:25:59 @@ -260,7 +260,6 @@
>> 07:25:59          finally:
>> 07:25:59              response.close()
>> 07:25:59
>> 07:25:59 -
>> 07:25:59  #: Registry for template providers
>> 07:25:59  _PROVIDERS = {
>> 07:25:59      'file': FileSystemTemplateProvider,
>> 07:25:59 Yapf failed, make sure to run:
>> 07:25:59     yapf --style .style.yapf --in-place --recursive .
>>
>>
>> vs.
>>
>>
>> 07:13:48 PYTHONPATH=/home/jenkins/workspace/lago_master_check-patch-el7-x86_64/lago python /home/jenkins/workspace/lago_master_check-patch-el7-x86_64/lago/tests/venv/bin/flake8
>> 07:13:52 ./lago/templates.py:264:1: E305 expected 2 blank lines after class or function definition, found 1
>> 07:13:52 make: *** [check-local] Error 1
>>
>>
>>
>> Come on... I just want my patch in, it has nothing to do with this supposed breakage.
>>
>> Y.
>>
>>
>> _______________________________________________
>> lago-devel mailing list
>> lago-devel at ovirt.org
>> http://lists.ovirt.org/mailman/listinfo/lago-devel
>>
>



More information about the lago-devel mailing list