# noqa works? I saw your last mail where you had doubts or I interpreted it in this way.
Anyway, a lot of pyflakes reported messages are wrong and I would like to ignore these parts line by line if it is really wrong.
----- Ursprüngliche Nachricht ----- Von: Merlijn van Deen Gesendet: 03.11.2013 21:50 An: Pywikipedia discussion list Betreff: Re: [Pywikipedia-l] python styling (pep8/pyflakes)
Some of them (I think mainly the line breaking ones) can be ignored by adding # noqa to the end of the line. If we really need something more than that, we can look at a custom
solution. What was the line that was giving you trouble?
Merlijn
On 3 November 2013 13:30, info@gno.de wrote:
Hi folks,
is there any ability now to ignore pep8 or pyflake testing from a specific code line?
Greetings
xqt
----- Original Nachricht ---- Von: Antoine Musso hashar+wmf@free.fr An: pywikipedia-l@lists.wikimedia.org Datum: 29.07.2013 21:41 Betreff: Re: [Pywikipedia-l] python styling (pep8/pyflakes)
Le 29/07/13 21:19, Merlijn van Deen a écrit :
Hm, indeed. # noqa is only supported in v1.4.1+; # nopep8 was introduced in v1.4+, and thus is also not available in 1.3. Would it be possible to upgrade to a more recent version? Ubuntu Saucy has 1.4.5 available.
Merlijn
I apparently managed to backport pep8 1.4.5 from Saucy to Precise using the tutorial at:
https://wikitech.wikimedia.org/wiki/Backport_packages
I have installed the package on the instance and it seems to be running fine. I have filled https://bugzilla.wikimedia.org/52239 to record the log of the build and track the backporting itself.
I will have to announce the upgrade ahead of time since it will introduce new failures that might makes some repos to suddenly fail their pep8 check.
-- Antoine "hashar" Musso
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
_______________________________________________ Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Ah, I'm not so sure about pyflakes - pyflakes is not as configurable as pep8 is, and I don't think # noqa works there.
I think there are also some alternatives (I think flakes8 might allow filtering), or we could add our own filtering to pyflakes -- we have our own configuration in Jenkins already.
Merlijn
On 4 November 2013 22:17, info@gno.de wrote:
# noqa works? I saw your last mail where you had doubts or I interpreted it in this way.
Anyway, a lot of pyflakes reported messages are wrong and I would like to ignore these parts line by line if it is really wrong.
Von: Merlijn van Deen Gesendet: 03.11.2013 21:50 An: Pywikipedia discussion list
Betreff: Re: [Pywikipedia-l] python styling (pep8/pyflakes)
Some of them (I think mainly the line breaking ones) can be ignored by adding # noqa to the end of the line. If we really need something more than that, we can look at a custom solution. What was the line that was giving you trouble?
Merlijn
On 3 November 2013 13:30, info@gno.de wrote:
Hi folks,
is there any ability now to ignore pep8 or pyflake testing from a specific code line?
Greetings
xqt
----- Original Nachricht ---- Von: Antoine Musso hashar+wmf@free.fr An: pywikipedia-l@lists.wikimedia.org Datum: 29.07.2013 21:41 Betreff: Re: [Pywikipedia-l] python styling (pep8/pyflakes)
Le 29/07/13 21:19, Merlijn van Deen a écrit :
Hm, indeed. # noqa is only supported in v1.4.1+; # nopep8 was
introduced
in v1.4+, and thus is also not available in 1.3. Would it be possible
to
upgrade to a more recent version? Ubuntu Saucy has 1.4.5 available.
Merlijn
I apparently managed to backport pep8 1.4.5 from Saucy to Precise using the tutorial at:
https://wikitech.wikimedia.org/wiki/Backport_packages
I have installed the package on the instance and it seems to be running fine. I have filled https://bugzilla.wikimedia.org/52239 to record the log of the build and track the backporting itself.
I will have to announce the upgrade ahead of time since it will introduce new failures that might makes some repos to suddenly fail their pep8 check.
-- Antoine "hashar" Musso
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
----- Original Nachricht ---- Von: Merlijn van Deen valhallasw@arctus.nl An: Pywikipedia discussion list pywikipedia-l@lists.wikimedia.org Datum: 05.11.2013 07:58 Betreff: Re: [Pywikipedia-l] python styling (pep8/pyflakes)
Ah, I'm not so sure about pyflakes - pyflakes is not as configurable as pep8 is, and I don't think # noqa works there.
I think there are also some alternatives (I think flakes8 might allow filtering), or we could add our own filtering to pyflakes -- we have our own configuration in Jenkins already.
Could you give me a hint where I could find the config to figure out that matter.
Rergards
xqt
Hi Merlijn,
is there any possibility to amend a commit to a given review via gerrit patch uploader? This may be important for our Google Code-In participants.
Greetings
xqt
Hi xqt,
Yes, but it's not as easy as I would like it to be. The trick is to add the Change-Id line from the previous patchset commit message to the new commit message. So if you want to add a new patch to https://gerrit.wikimedia.org/r/#/c/96693/, fill in the patch uploader as usual, but add
Change-Id: I0c31cd68dc372ed38f461e430c135350a1581828 https://gerrit.wikimedia.org/r/#q,I0c31cd68dc372ed38f461e430c135350a1581828,n,z
to the bottom of the commit message field.
Hope this helps, Merlijn
On 21 November 2013 08:21, info@gno.de wrote:
Hi Merlijn,
is there any possibility to amend a commit to a given review via gerrit patch uploader? This may be important for our Google Code-In participants.
Greetings
xqt
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
I need to add what Merlijn said is correct for any kind of patch submitting. For example if you're using linux and you want to amend a patch you just need to change it and "git add file.py" and "git commit" and add change id to commit summary and "git review -R" and it'll be done!
Best On Nov 21, 2013 11:22 AM, "Merlijn van Deen" valhallasw@arctus.nl wrote:
Hi xqt,
Yes, but it's not as easy as I would like it to be. The trick is to add the Change-Id line from the previous patchset commit message to the new commit message. So if you want to add a new patch to https://gerrit.wikimedia.org/r/#/c/96693/, fill in the patch uploader as usual, but add
Change-Id: I0c31cd68dc372ed38f461e430c135350a1581828 https://gerrit.wikimedia.org/r/#q,I0c31cd68dc372ed38f461e430c135350a1581828,n,z
to the bottom of the commit message field.
Hope this helps, Merlijn
On 21 November 2013 08:21, info@gno.de wrote:
Hi Merlijn,
is there any possibility to amend a commit to a given review via gerrit patch uploader? This may be important for our Google Code-In participants.
Greetings
xqt
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
Hi Merlijn,
I tried to review your commits relating to py3 compatibility. I am unsure about "PY3" os environment. Is this set by the python3 installation or must be set by hand?
And what is the reason do you use that environment setting and not sys.version or sys.version_info.
Thanks
xqt
Hi xqt,
On 7 December 2013 10:49, info@gno.de wrote:
I tried to review your commits relating to py3 compatibility. I am unsure about "PY3" os environment. Is this set by the python3 installation or must be set by hand?
This must be set by hand. Python 3 support is not functional yet, so I have kept the 'Pywikibot is not Python 3 compatible' error in place. Of course, to work on Py3 support, one has to be able to ignore that error -- which is exactly what the PY3 environment variable does.
e.g. (py33)valhallasw@lisilwen:~/src/pwb/pywikibot-core$ python3.3 pwb.py Traceback (most recent call last): File "pwb.py", line 77, in <module> raise RuntimeError("ERROR: Pywikipediabot only runs under Python 2") RuntimeError: ERROR: Pywikipediabot only runs under Python 2
(py33)valhallasw@lisilwen:~/src/pwb/pywikibot-core$ PY3=1 python3.3 pwb.py wrapper script to use rewrite in 'directory' mode - run scripts using python pwb.py <name_of_script> <options>
and it will use the package directory to store all user files, will fix up search paths so the package does not need to be installed, etc.
Once support for Python 3.3+ is finished, we can remove warning altogether.
Merlijn
Merlijn