From kviktor at cloud.bme.hu Wed Oct 7 14:43:27 2015 From: kviktor at cloud.bme.hu (=?UTF-8?Q?K=C3=A1lm=C3=A1n_Viktor?=) Date: Wed, 07 Oct 2015 14:43:27 +0200 Subject: [code-quality] flake8 package versions Message-ID: <8a5b41ac5a282bde21e22eb0d81d489e@cloud.bme.hu> Hey, are you guys planning to upgrade the pep8 and the pyflakes8 packages in flake8? If I update them manually everything works great, see: (xy)xy at xy:~$ flake8 --version 2.4.1 (pep8: 1.6.2, pyflakes: 1.0.0, mccabe: 0.3.1) CPython 3.4.0 on Linux However if I uninstall flake8 and reinstall it (or simply upgrade an older version) then I get outdated versions of pep8 and pyflakes. (xy)xy at xy:~$ flake8 --version 2.4.1 (pep8: 1.5.7, pyflakes: 0.8.1, mccabe: 0.3.1) CPython 3.4.0 on Linux Regards, Viktor From graffatcolmingov at gmail.com Thu Oct 8 04:07:14 2015 From: graffatcolmingov at gmail.com (Ian Cordasco) Date: Wed, 7 Oct 2015 21:07:14 -0500 Subject: [code-quality] flake8 package versions In-Reply-To: <8a5b41ac5a282bde21e22eb0d81d489e@cloud.bme.hu> References: <8a5b41ac5a282bde21e22eb0d81d489e@cloud.bme.hu> Message-ID: On Wed, Oct 7, 2015 at 7:43 AM, K?lm?n Viktor wrote: > Hey, > > are you guys planning to upgrade the pep8 and the pyflakes8 packages in > flake8? > If I update them manually everything works great, see: > > (xy)xy at xy:~$ flake8 --version > 2.4.1 (pep8: 1.6.2, pyflakes: 1.0.0, mccabe: 0.3.1) CPython 3.4.0 on Linux > > However if I uninstall flake8 and reinstall it (or simply upgrade an older > version) then I get outdated versions of pep8 and pyflakes. > > (xy)xy at xy:~$ flake8 --version > 2.4.1 (pep8: 1.5.7, pyflakes: 0.8.1, mccabe: 0.3.1) CPython 3.4.0 on Linux > > > > Regards, > Viktor Hi Viktor, Here's some discussion to help you understand why we will not be updating pep8 until there's a new release: - https://gitlab.com/pycqa/flake8/issues/35 - https://gitlab.com/pycqa/flake8/issues/37 - https://gitlab.com/pycqa/flake8/issues/68 - https://gitlab.com/pycqa/flake8/issues/47 - https://gitlab.com/pycqa/flake8/issues/48 - https://gitlab.com/pycqa/flake8/issues/72 I should be able to create a 2.5.0 release that will increase the version cap on pyflakes soon but quality pull requests to address the remaining issues in the 2.5.0 milestone on GitLab would help accelerate the process. Cheers, Ian From tekberg at uw.edu Thu Oct 8 17:45:07 2015 From: tekberg at uw.edu (Tom Ekberg) Date: Thu, 8 Oct 2015 08:45:07 -0700 (PDT) Subject: [code-quality] false positive undefined-variable Message-ID: Here is my 9 line python program: """ Nothing to see here """ def is_priority(row): """ Priority tests """ print row Here is the command line output, sans reports: $ pylint --report=n foobarbaz.py No config file found, using default configuration ************* Module hud.monitors.foobarbaz E: 9,10: Undefined variable 'row' (undefined-variable) Why is row undefined if it is a function parameter? I realize I can turn it off with a configuration file, but this is such a simple case. I must be doing something wrong to get this error. Because I'm sure you will ask, here is the pylint version detail: $ pylint --version No config file found, using default configuration pylint 1.4.4, astroid 1.4.0, common 1.0.2 Python 2.7.3 (default, Feb 27 2014, 19:58:35) [GCC 4.6.3] Running Ubuntu 12.04.4 LTS. Tom Ekberg Senior Computer Specialist, Lab Medicine University of Washington Medical Center 1959 NE Pacific St, MS 357110 Seattle WA 98195 work: (206) 598-8544 email: tekberg at uw.edu From pcmanticore at gmail.com Thu Oct 8 21:16:21 2015 From: pcmanticore at gmail.com (Claudiu Popa) Date: Thu, 8 Oct 2015 22:16:21 +0300 Subject: [code-quality] false positive undefined-variable In-Reply-To: References: Message-ID: On Thu, Oct 8, 2015 at 6:45 PM, Tom Ekberg wrote: > Here is my 9 line python program: > > """ > Nothing to see here > """ > > def is_priority(row): > """ > Priority tests > """ > print row > > Here is the command line output, sans reports: > > $ pylint --report=n foobarbaz.py > No config file found, using default configuration > ************* Module hud.monitors.foobarbaz > E: 9,10: Undefined variable 'row' (undefined-variable) > > Why is row undefined if it is a function parameter? I realize I can turn it off with a configuration file, but this is such a simple case. I must be doing something wrong to get this error. > > Because I'm sure you will ask, here is the pylint version detail: > > $ pylint --version > No config file found, using default configuration > pylint 1.4.4, > astroid 1.4.0, common 1.0.2 > Python 2.7.3 (default, Feb 27 2014, 19:58:35) > [GCC 4.6.3] > > Running Ubuntu 12.04.4 LTS. > > Tom Ekberg > Senior Computer Specialist, Lab Medicine > University of Washington Medical Center > 1959 NE Pacific St, MS 357110 > Seattle WA 98195 > work: (206) 598-8544 > email: tekberg at uw.edu > > > _______________________________________________ > code-quality mailing list > code-quality at python.org > https://mail.python.org/mailman/listinfo/code-quality Hi, I can't reproduce the issue. Are you sure this is the code that triggers the problem? You could also check if this happens again using the code from the repository. I doubt it though, code such as this could trigger tons of failures in our CI, so there must be something wrong with the given sample code. /Claudiu From amfarrell at mit.edu Thu Oct 8 21:38:12 2015 From: amfarrell at mit.edu (Andrew Farrell) Date: Thu, 8 Oct 2015 14:38:12 -0500 Subject: [code-quality] false positive undefined-variable In-Reply-To: References: Message-ID: The first time I tried reproducing this, I got ************* Module testtom C: 1, 0: Missing module docstring (missing-docstring) E: 5,10: Undefined variable 'row' (undefined-variable) W: 1,16: Unused argument 'now' (unused-argument) After fixing my typo, I only see the error C: 1, 0: Missing module docstring (missing-docstring) so perhaps you've got a typo On Thu, Oct 8, 2015 at 10:45 AM, Tom Ekberg wrote: > Here is my 9 line python program: > > """ > Nothing to see here > """ > > def is_priority(row): > """ > Priority tests > """ > print row > > Here is the command line output, sans reports: > > $ pylint --report=n foobarbaz.py > No config file found, using default configuration > ************* Module hud.monitors.foobarbaz > E: 9,10: Undefined variable 'row' (undefined-variable) > > Why is row undefined if it is a function parameter? I realize I can turn > it off with a configuration file, but this is such a simple case. I must be > doing something wrong to get this error. > > Because I'm sure you will ask, here is the pylint version detail: > > $ pylint --version > No config file found, using default configuration > pylint 1.4.4, > astroid 1.4.0, common 1.0.2 > Python 2.7.3 (default, Feb 27 2014, 19:58:35) > [GCC 4.6.3] > > Running Ubuntu 12.04.4 LTS. > > Tom Ekberg > Senior Computer Specialist, Lab Medicine > University of Washington Medical Center > 1959 NE Pacific St, MS 357110 > Seattle WA 98195 > work: (206) 598-8544 > email: tekberg at uw.edu > > > _______________________________________________ > code-quality mailing list > code-quality at python.org > https://mail.python.org/mailman/listinfo/code-quality > -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul.hargreaves at technowizardry.co.uk Mon Oct 12 21:08:04 2015 From: paul.hargreaves at technowizardry.co.uk (Paul Hargreaves) Date: Mon, 12 Oct 2015 20:08:04 +0100 Subject: [code-quality] FreeBSD installation of pylint3 Message-ID: I?ve followed the install instructions here: http://pylint.org/#support (Installed portmaster, it?s not included by default). portmaster devel/pylint After it builds: $ pylint --version No config file found, using default configuration pylint 1.3.1, astroid 1.2.1, common 0.62.1 Python 2.7.10 (default, Aug 9 2015, 01:20:33) [GCC 4.2.1 Compatible FreeBSD Clang 3.4.1 (tags/RELEASE_34/dot1-final 208032)] $ uname -a FreeBSD z 10.2-RELEASE FreeBSD 10.2-RELEASE #0 r286666: Wed Aug 12 15:26:37 UTC 2015 root at releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 $ python3 --version Python 3.4.3 $ pylint3 pylint3: not found $ Any attempts to verify a python 3 file fail with things like: C: 6, 0: Unnecessary parens after 'print' keyword (superfluous-parens) Are there different instructions to installing for python3? Thanks. From contact at jeffquast.com Mon Oct 12 22:04:37 2015 From: contact at jeffquast.com (Jeff Quast) Date: Mon, 12 Oct 2015 13:04:37 -0700 Subject: [code-quality] FreeBSD installation of pylint3 In-Reply-To: References: Message-ID: <87CE7105-A64F-4486-B5FD-9B25F11CF842@jeffquast.com> The version of pip used matches the version of python it installs for. Use ?pip3? or ?pip3.5? or whatever is more suitable instead of ?pip?. > On Oct 12, 2015, at 12:08 PM, Paul Hargreaves wrote: > > I?ve followed the install instructions here: > http://pylint.org/#support > > (Installed portmaster, it?s not included by default). > portmaster devel/pylint > > After it builds: > > $ pylint --version > No config file found, using default configuration > pylint 1.3.1, > astroid 1.2.1, common 0.62.1 > Python 2.7.10 (default, Aug 9 2015, 01:20:33) > [GCC 4.2.1 Compatible FreeBSD Clang 3.4.1 (tags/RELEASE_34/dot1-final 208032)] > $ uname -a > FreeBSD z 10.2-RELEASE FreeBSD 10.2-RELEASE #0 r286666: Wed Aug 12 15:26:37 UTC 2015 root at releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 > $ python3 --version > Python 3.4.3 > $ pylint3 > pylint3: not found > $ > > Any attempts to verify a python 3 file fail with things like: > C: 6, 0: Unnecessary parens after 'print' keyword (superfluous-parens) > > > Are there different instructions to installing for python3? > > Thanks. > _______________________________________________ > code-quality mailing list > code-quality at python.org > https://mail.python.org/mailman/listinfo/code-quality From graffatcolmingov at gmail.com Mon Oct 12 22:22:14 2015 From: graffatcolmingov at gmail.com (Ian Cordasco) Date: Mon, 12 Oct 2015 15:22:14 -0500 Subject: [code-quality] FreeBSD installation of pylint3 In-Reply-To: <87CE7105-A64F-4486-B5FD-9B25F11CF842@jeffquast.com> References: <87CE7105-A64F-4486-B5FD-9B25F11CF842@jeffquast.com> Message-ID: On Mon, Oct 12, 2015 at 3:04 PM, Jeff Quast wrote: > The version of pip used matches the version of python it installs for. > > Use ?pip3? or ?pip3.5? or whatever is more suitable instead of ?pip?. I've actually found it most reliable to do: $ python3.5 -m pip install pylint (and other packages) From paul.hargreaves at technowizardry.co.uk Mon Oct 12 23:03:15 2015 From: paul.hargreaves at technowizardry.co.uk (Paul Hargreaves) Date: Mon, 12 Oct 2015 22:03:15 +0100 Subject: [code-quality] FreeBSD installation of pylint3 In-Reply-To: References: <87CE7105-A64F-4486-B5FD-9B25F11CF842@jeffquast.com> Message-ID: > $ python3.5 -m pip install pylint (and other packages) $ python3.5 -m pip install pylint python3.5: not found Likely this is because BSD is still at 3.4: $ python3 --version Python 3.4.3 But skipping the full version doesn?t work either: $ python3 -m pip install pylint /usr/local/bin/python3: No module named pip $ > Use ?pip3? or ?pip3.5? or whatever is more suitable instead of ?pip?. No instructions to use pip; http://pylint.org/#install says FreeBSD portmaster devel/pylint Which is what I did. Didn?t have this problem on Linux, just on FreeBSD. > On 12 Oct 2015, at 21:22, Ian Cordasco wrote: > > On Mon, Oct 12, 2015 at 3:04 PM, Jeff Quast wrote: >> The version of pip used matches the version of python it installs for. >> >> Use ?pip3? or ?pip3.5? or whatever is more suitable instead of ?pip?. > > I've actually found it most reliable to do: > > $ python3.5 -m pip install pylint (and other packages) > _______________________________________________ > code-quality mailing list > code-quality at python.org > https://mail.python.org/mailman/listinfo/code-quality From contact at jeffquast.com Mon Oct 12 23:16:58 2015 From: contact at jeffquast.com (Jeff Quast) Date: Mon, 12 Oct 2015 14:16:58 -0700 Subject: [code-quality] FreeBSD installation of pylint3 In-Reply-To: References: <87CE7105-A64F-4486-B5FD-9B25F11CF842@jeffquast.com> Message-ID: > On Oct 12, 2015, at 2:03 PM, Paul Hargreaves wrote: > > Likely this is because BSD is still at 3.4: > $ python3 --version > Python 3.4.3 I maintain a FreeBSD build slave, and 3.5 is most certainly available as of a few weeks ago, I just reviewed my ?history? output there. You may issue commands: $ sudo pkg update $ sudo pkg add python35 FreeBSD ships pip as a package. I suggest not to install it through freebsd, but rather using get-pip.py(*). $ sudo python3.5 get-pip.py jq - (*)As pip updates itself, and installs and updates all other python packages, I am against the operating system managing anything but the python interpreter by principal. For example, when attempting to perform a ?pkg" upgrade of all installed python packages through freebsd, it will downgrade pip and many others as it ?uninstalls? something pip may have later upgraded without its knowledge, producing bad state in the site-packages folder. From marius at gedmin.as Tue Oct 13 10:23:38 2015 From: marius at gedmin.as (Marius Gedminas) Date: Tue, 13 Oct 2015 11:23:38 +0300 Subject: [code-quality] FreeBSD installation of pylint3 In-Reply-To: References: <87CE7105-A64F-4486-B5FD-9B25F11CF842@jeffquast.com> Message-ID: <20151013082338.GA28884@platonas> On Mon, Oct 12, 2015 at 02:16:58PM -0700, Jeff Quast wrote: > > > On Oct 12, 2015, at 2:03 PM, Paul Hargreaves wrote: > > > > Likely this is because BSD is still at 3.4: > > $ python3 --version > > Python 3.4.3 > > I maintain a FreeBSD build slave, and 3.5 is most certainly available as of a few weeks ago, I just reviewed my ?history? output there. You may issue commands: > > $ sudo pkg update > $ sudo pkg add python35 > > FreeBSD ships pip as a package. I suggest not to install it through freebsd, but rather using get-pip.py(*). > > $ sudo python3.5 get-pip.py Why not 'sudo python3.5 -m ensurepip'? It's basically get-pip.py, included in the standard library since 3.4. > (*)As pip updates itself, and installs and updates all other python packages, I am against the operating system managing anything but the python interpreter by principal. > > For example, when attempting to perform a ?pkg" upgrade of all installed python packages through freebsd, it will downgrade pip and many others as it ?uninstalls? something pip may have later upgraded without its knowledge, producing bad state in the site-packages folder. Marius Gedminas -- Colorless green ideas sleep furiously. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 173 bytes Desc: Digital signature URL: From me at the-compiler.org Fri Oct 16 17:51:34 2015 From: me at the-compiler.org (Florian Bruhin) Date: Fri, 16 Oct 2015 17:51:34 +0200 Subject: [code-quality] Moving pylint/astroid to GitHub Message-ID: <20151016155134.GH29343@tonks> Hey, what do you think about moving pylint and astroid from Bitbucket/hg to GitHub/git? I've briefly talked with Claudiu about this, and he seems open to the idea and suggested I write this mail :) If people agree, I'll be able to move issues (including the correct issue numbers) and the repository (including tags/branches). I recently helped doing the same for pytest: https://bitbucket.org/pytest-dev/pytest/issues/699/ Unfortunately, I didn't find a good way to migrate pull requests, so those would've been to be recreated by their authors. Some rationales, from my point of view: - GitHub has the bigger exposure, and more people are familiar with it than with Bitbucket - this potentially means more contributors. - Contributing is IMHO cumbersome with Bitbucket. Apparently, one's supposed to use bookmarks instead of branches (because branches can't be deleted, IIRC), but Bitbucket doesn't support doing pull requests with them - the "solution" Bitbucket uses when editing things with the online editor is to create a new fork for every change, by the way... I also tried to find documentation for basic stuff like "how do I contribute to a project with branches and PRs", and found it very difficult. Sure, I'm used to git, but getting started with git was a lot easier than with hg/bitbucket. - Travis CI[1] is a lot better than drone.io, the current CI system in use. For example, one is able to test PRs, which is something essential in a CI IMHO (and also makes contributing easier). I don't think I need to elaborate on that :) - There's also a lot of other potentially useful tooling which is available for GitHub, but not BitBucket - see point 1 (bigger exposure). [1] https://travis-ci.org/ My plan would be to create a pylint organization on GitHub and move the repos and issues there. Opinions? Florian -- http://www.the-compiler.org | me at the-compiler.org (Mail/XMPP) GPG: 916E B0C8 FD55 A072 | http://the-compiler.org/pubkey.asc I love long mails! | http://email.is-not-s.ms/ -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: From graffatcolmingov at gmail.com Fri Oct 16 19:41:59 2015 From: graffatcolmingov at gmail.com (Ian Cordasco) Date: Fri, 16 Oct 2015 12:41:59 -0500 Subject: [code-quality] Moving pylint/astroid to GitHub In-Reply-To: <20151016155134.GH29343@tonks> References: <20151016155134.GH29343@tonks> Message-ID: On Oct 16, 2015 10:56 AM, "Florian Bruhin" wrote: > > Hey, > > what do you think about moving pylint and astroid from Bitbucket/hg to > GitHub/git? I've briefly talked with Claudiu about this, and he seems > open to the idea and suggested I write this mail :) > > If people agree, I'll be able to move issues (including the correct > issue numbers) and the repository (including tags/branches). I > recently helped doing the same for pytest: > > https://bitbucket.org/pytest-dev/pytest/issues/699/ > > Unfortunately, I didn't find a good way to migrate pull requests, so > those would've been to be recreated by their authors. > > Some rationales, from my point of view: > > - GitHub has the bigger exposure, and more people are familiar with it > than with Bitbucket - this potentially means more contributors. > > - Contributing is IMHO cumbersome with Bitbucket. Apparently, one's > supposed to use bookmarks instead of branches (because branches > can't be deleted, IIRC), but Bitbucket doesn't support doing pull > requests with them - the "solution" Bitbucket uses when editing > things with the online editor is to create a new fork for every > change, by the way... > > I also tried to find documentation for basic stuff like "how do I > contribute to a project with branches and PRs", and found it very > difficult. Sure, I'm used to git, but getting started with git was > a lot easier than with hg/bitbucket. > > - Travis CI[1] is a lot better than drone.io, the current CI system in > use. For example, one is able to test PRs, which is something > essential in a CI IMHO (and also makes contributing easier). > > I don't think I need to elaborate on that :) > > - There's also a lot of other potentially useful tooling which is > available for GitHub, but not BitBucket - see point 1 (bigger > exposure). > > [1] https://travis-ci.org/ > > My plan would be to create a pylint organization on GitHub and move > the repos and issues there. > > Opinions? > > Florian I'm replying from my phone so forgive me for being brief. A month or longer ago there was discussion by Claudiu about moving pulling to the PyCQA (Python Code Quality Authority). I'm still willing to make you both administrators if you're interested in still doing this. Regarding the move to GitHub I have no strong opinions. Flake8 moved to GitLab and mirror on GitHub and accept PRs there. Personally I have grown to prefer GitLab but that's me. We've definitely benefited from the move to git but I don't think we would have increased participation any more than we have by moving all parts of the project to GitHub. Cheers, Ian -------------- next part -------------- An HTML attachment was scrubbed... URL: From ianlee1521 at gmail.com Fri Oct 16 20:55:21 2015 From: ianlee1521 at gmail.com (Ian Lee) Date: Fri, 16 Oct 2015 11:55:21 -0700 Subject: [code-quality] Moving pylint/astroid to GitHub In-Reply-To: References: <20151016155134.GH29343@tonks> Message-ID: Seems reasonable to me as well for the reasons outlined. I think rather than a new organization in GitHub I would pick the PyCQA org that already exists (and did for pep8's recent move). But just my two cents. ~ Ian Lee On Oct 16, 2015 10:42 AM, "Ian Cordasco" wrote: > > On Oct 16, 2015 10:56 AM, "Florian Bruhin" wrote: > > > > Hey, > > > > what do you think about moving pylint and astroid from Bitbucket/hg to > > GitHub/git? I've briefly talked with Claudiu about this, and he seems > > open to the idea and suggested I write this mail :) > > > > If people agree, I'll be able to move issues (including the correct > > issue numbers) and the repository (including tags/branches). I > > recently helped doing the same for pytest: > > > > https://bitbucket.org/pytest-dev/pytest/issues/699/ > > > > Unfortunately, I didn't find a good way to migrate pull requests, so > > those would've been to be recreated by their authors. > > > > Some rationales, from my point of view: > > > > - GitHub has the bigger exposure, and more people are familiar with it > > than with Bitbucket - this potentially means more contributors. > > > > - Contributing is IMHO cumbersome with Bitbucket. Apparently, one's > > supposed to use bookmarks instead of branches (because branches > > can't be deleted, IIRC), but Bitbucket doesn't support doing pull > > requests with them - the "solution" Bitbucket uses when editing > > things with the online editor is to create a new fork for every > > change, by the way... > > > > I also tried to find documentation for basic stuff like "how do I > > contribute to a project with branches and PRs", and found it very > > difficult. Sure, I'm used to git, but getting started with git was > > a lot easier than with hg/bitbucket. > > > > - Travis CI[1] is a lot better than drone.io, the current CI system in > > use. For example, one is able to test PRs, which is something > > essential in a CI IMHO (and also makes contributing easier). > > > > I don't think I need to elaborate on that :) > > > > - There's also a lot of other potentially useful tooling which is > > available for GitHub, but not BitBucket - see point 1 (bigger > > exposure). > > > > [1] https://travis-ci.org/ > > > > My plan would be to create a pylint organization on GitHub and move > > the repos and issues there. > > > > Opinions? > > > > Florian > > I'm replying from my phone so forgive me for being brief. > > A month or longer ago there was discussion by Claudiu about moving pulling > to the PyCQA (Python Code Quality Authority). I'm still willing to make you > both administrators if you're interested in still doing this. > > Regarding the move to GitHub I have no strong opinions. Flake8 moved to > GitLab and mirror on GitHub and accept PRs there. Personally I have grown > to prefer GitLab but that's me. We've definitely benefited from the move to > git but I don't think we would have increased participation any more than > we have by moving all parts of the project to GitHub. > > Cheers, > Ian > > _______________________________________________ > code-quality mailing list > code-quality at python.org > https://mail.python.org/mailman/listinfo/code-quality > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ceridwen.mailing.lists at gmail.com Fri Oct 16 23:21:09 2015 From: ceridwen.mailing.lists at gmail.com (Cara) Date: Fri, 16 Oct 2015 17:21:09 -0400 Subject: [code-quality] code-quality Digest, Vol 32, Issue 4 In-Reply-To: References: Message-ID: <1445030469.31843.60.camel@gmail.com> > what do you think about moving pylint and astroid from Bitbucket/hg to > GitHub/git? I've briefly talked with Claudiu about this, and he seems > open to the idea and suggested I write this mail :) I vote in favor, principally because of the CI issue. I find Github's interface easier to use, though not by enough to make me care much, and I'm not attached to Mercurial or Git, but drone.io is the source of persistent problems for me when working on astroid because it runs ancient software. Apparently it's still on Mercurial 2.0, and the latest Python version it supports is 3.3. Since most people who use Python 3 at all use the latest release, having a CI that's two full versions behind undercuts the point of having a CI in the first place, since drone.io isn't even testing the Python 3 version most users have. Cara From lsanmartinr at gmail.com Mon Oct 19 15:09:55 2015 From: lsanmartinr at gmail.com (Luis San Martin) Date: Mon, 19 Oct 2015 10:09:55 -0300 Subject: [code-quality] (no subject) Message-ID: Hello, I've tried pep8 and flake8 on python 3.6.0a0 though both will not work. pathcl at sid:~/src$ flake8 Traceback (most recent call last): File "/home/pathcl/.pyenv/versions/3.6-dev/bin/flake8", line 7, in from flake8.main import main File "/home/pathcl/.pyenv/versions/3.6-dev/lib/python3.6/site-packages/flake8/main.py", line 8, in from flake8.engine import get_parser, get_style_guide File "/home/pathcl/.pyenv/versions/3.6-dev/lib/python3.6/site-packages/flake8/engine.py", line 6, in import pep8 File "/home/pathcl/.pyenv/versions/3.6-dev/lib/python3.6/site-packages/pep8.py", line 1204, in init_checks_registry() File "/home/pathcl/.pyenv/versions/3.6-dev/lib/python3.6/site-packages/pep8.py", line 1203, in init_checks_registry register_check(function) File "/home/pathcl/.pyenv/versions/3.6-dev/lib/python3.6/site-packages/pep8.py", line 1186, in register_check args = inspect.getargspec(check)[0] AttributeError: module 'inspect' has no attribute 'getargspec' it seems getargspec is going to be deprecated. https://docs.python.org/3.6/whatsnew/3.6.html#removed Kind regards -- Luis San Martin R. User #333411 linuxcounter.net From graffatcolmingov at gmail.com Mon Oct 19 15:13:19 2015 From: graffatcolmingov at gmail.com (Ian Cordasco) Date: Mon, 19 Oct 2015 08:13:19 -0500 Subject: [code-quality] (no subject) In-Reply-To: References: Message-ID: On Mon, Oct 19, 2015 at 8:09 AM, Luis San Martin wrote: > Hello, > > I've tried pep8 and flake8 on python 3.6.0a0 though both will not work. > > pathcl at sid:~/src$ flake8 > Traceback (most recent call last): > File "/home/pathcl/.pyenv/versions/3.6-dev/bin/flake8", line 7, in > from flake8.main import main > File "/home/pathcl/.pyenv/versions/3.6-dev/lib/python3.6/site-packages/flake8/main.py", > line 8, in > from flake8.engine import get_parser, get_style_guide > File "/home/pathcl/.pyenv/versions/3.6-dev/lib/python3.6/site-packages/flake8/engine.py", > line 6, in > import pep8 > File "/home/pathcl/.pyenv/versions/3.6-dev/lib/python3.6/site-packages/pep8.py", > line 1204, in > init_checks_registry() > File "/home/pathcl/.pyenv/versions/3.6-dev/lib/python3.6/site-packages/pep8.py", > line 1203, in init_checks_registry > register_check(function) > File "/home/pathcl/.pyenv/versions/3.6-dev/lib/python3.6/site-packages/pep8.py", > line 1186, in register_check > args = inspect.getargspec(check)[0] > AttributeError: module 'inspect' has no attribute 'getargspec' > > > it seems getargspec is going to be deprecated. > https://docs.python.org/3.6/whatsnew/3.6.html#removed Hi Luis, pep8 has a fix for this in master but it is not a priority to make a release containing this since Python 3.6 will not be released for approximately another year and a half. Please check closed issues and pull requests in the future for this information. -- Ian From skip.montanaro at gmail.com Mon Oct 19 19:29:07 2015 From: skip.montanaro at gmail.com (Skip Montanaro) Date: Mon, 19 Oct 2015 10:29:07 -0700 Subject: [code-quality] How to tell pylint about base class attributes? Message-ID: I'm linting a piece of code containing a class which inherits from a base class which is not available at lint time. Consequently, I get all sorts of messages about unknown attributes which the subclass uses from its parent. Short of completely disabling E1101 (no-member), is there a way to say, "class B, a subclass of class A which you can't see, really does have an attribute named x"? The code for class A is not going to be available, as I'm just running pylint in isolation from the rest of the environment in which it is run. Thx, Skip Montanaro -------------- next part -------------- An HTML attachment was scrubbed... URL: From pcmanticore at gmail.com Mon Oct 19 20:08:03 2015 From: pcmanticore at gmail.com (Claudiu Popa) Date: Mon, 19 Oct 2015 21:08:03 +0300 Subject: [code-quality] How to tell pylint about base class attributes? In-Reply-To: References: Message-ID: On Mon, Oct 19, 2015 at 8:29 PM, Skip Montanaro wrote: > I'm linting a piece of code containing a class which inherits from a base > class which is not available at lint time. Consequently, I get all sorts of > messages about unknown attributes which the subclass uses from its parent. > Short of completely disabling E1101 (no-member), is there a way to say, > "class B, a subclass of class A which you can't see, really does have an > attribute named x"? The code for class A is not going to be available, as > I'm just running pylint in isolation from the rest of the environment in > which it is run. > > Thx, > > Skip Montanaro > > If it's Pylint 1.5.0 (unreleased), it will not warn no-member if any of the base classes are unknown. Alternatively, you could use generated-members option to specify what attributes are expected to be created at runtime. Hope this helps. Claudiu From lsanmartinr at gmail.com Mon Oct 19 15:16:08 2015 From: lsanmartinr at gmail.com (Luis San Martin) Date: Mon, 19 Oct 2015 10:16:08 -0300 Subject: [code-quality] (no subject) In-Reply-To: References: Message-ID: Thank you Ian On Mon, Oct 19, 2015 at 10:13 AM, Ian Cordasco wrote: > On Mon, Oct 19, 2015 at 8:09 AM, Luis San Martin wrote: >> Hello, >> >> I've tried pep8 and flake8 on python 3.6.0a0 though both will not work. >> >> pathcl at sid:~/src$ flake8 >> Traceback (most recent call last): >> File "/home/pathcl/.pyenv/versions/3.6-dev/bin/flake8", line 7, in >> from flake8.main import main >> File "/home/pathcl/.pyenv/versions/3.6-dev/lib/python3.6/site-packages/flake8/main.py", >> line 8, in >> from flake8.engine import get_parser, get_style_guide >> File "/home/pathcl/.pyenv/versions/3.6-dev/lib/python3.6/site-packages/flake8/engine.py", >> line 6, in >> import pep8 >> File "/home/pathcl/.pyenv/versions/3.6-dev/lib/python3.6/site-packages/pep8.py", >> line 1204, in >> init_checks_registry() >> File "/home/pathcl/.pyenv/versions/3.6-dev/lib/python3.6/site-packages/pep8.py", >> line 1203, in init_checks_registry >> register_check(function) >> File "/home/pathcl/.pyenv/versions/3.6-dev/lib/python3.6/site-packages/pep8.py", >> line 1186, in register_check >> args = inspect.getargspec(check)[0] >> AttributeError: module 'inspect' has no attribute 'getargspec' >> >> >> it seems getargspec is going to be deprecated. >> https://docs.python.org/3.6/whatsnew/3.6.html#removed > > Hi Luis, > > pep8 has a fix for this in master but it is not a priority to make a > release containing this since Python 3.6 will not be released for > approximately another year and a half. Please check closed issues and > pull requests in the future for this information. > > -- > Ian -- Luis San Martin R. User #333411 linuxcounter.net From renon at mr-consultant.net Tue Oct 20 10:38:47 2015 From: renon at mr-consultant.net (Michel RENON) Date: Tue, 20 Oct 2015 10:38:47 +0200 Subject: [code-quality] Question about pylint plugin Message-ID: <5625FD97.1020605@mr-consultant.net> Hi, I'm trying to write a pylint checker and I have a problem. Based on several examples found on internet, I wrote a checker skeleton. It is loaded, but it never get called to check. In the following example, the '__init__()' method is called, but other methods 'open()', 'visit_class()', 'visit_function()' and 'visit_callfunc()' are never called. As the checker is loaded, it's not a problem in the pylint command. Do you have any clues to solve that problem ? Here are the 3 files (all stored in the same folder): first, the checker : "fields_checker.py" 8<----------------------------------------- import astroid from pylint.interfaces import IAstroidChecker from pylint.checkers import BaseChecker class MyFieldsChecker(BaseChecker): """Checks for my fields """ __implements__ = (IAstroidChecker,) name = 'my-fields-checker' msgs = {} def __init__(self, linter=None): BaseChecker.__init__(self, linter) print("MyFieldsChecker.__init__()") def open(self): print("MyFieldsChecker.open() ") def visit_attribute(self, node): print("MyFieldsChecker.visit_Attribute : {}".format(dir(node))) self.generic_visit(node) def visit_class (self, node): print("MyFieldsChecker.visit_class : {}".format(dir(node))) self.generic_visit(node) def visit_function(self, node): print("MyFieldsChecker.visit_function : {}".format(dir(node))) self.generic_visit(node) def visit_callfunc(self, node): print("MyFieldsChecker.visit_callfunc : {}".format(dir(node))) self.generic_visit(node) def register(linter): """required method to auto register this checker """ print("DEBUG register MyFieldsChecker") linter.register_checker(MyFieldsChecker(linter)) 8<----------------------------------------- then the pylint command, executed on Ubuntu 14.04 : "do.sh" 8<----------------------------------------- PYTHONPATH=${PYTHONPATH}:$(pwd) export PYTHONPATH pylint --load-plugins=fields_checker -r n test.py 8<----------------------------------------- and just fyi, the tested python file : "test.py" 8<----------------------------------------- def method1(p, q, r): print p, q, r method1('a', 'b', 'c') class Test(object): def __init__(self): self.f1 = "a" _myfields = { 'f2' : "azerty", } t = Test() 8<----------------------------------------- and the result : 8<----------------------------------------- $ sh do.sh DEBUG register MyFieldsChecker MyFieldsChecker.__init__() ************* Module test C: 1, 0: Missing module docstring (missing-docstring) C: 3, 0: Invalid argument name "p" (invalid-name) C: 3, 0: Invalid argument name "q" (invalid-name) C: 3, 0: Invalid argument name "r" (invalid-name) C: 3, 0: Missing function docstring (missing-docstring) C: 12, 8: Invalid attribute name "f1" (invalid-name) C: 9, 0: Missing class docstring (missing-docstring) R: 9, 0: Too few public methods (0/2) (too-few-public-methods) C: 21, 0: Invalid constant name "t" (invalid-name) 8<----------------------------------------- Thanks, Michel From pcmanticore at gmail.com Tue Oct 20 11:52:54 2015 From: pcmanticore at gmail.com (Claudiu Popa) Date: Tue, 20 Oct 2015 12:52:54 +0300 Subject: [code-quality] Question about pylint plugin In-Reply-To: <5625FD97.1020605@mr-consultant.net> References: <5625FD97.1020605@mr-consultant.net> Message-ID: On Tue, Oct 20, 2015 at 11:38 AM, Michel RENON wrote: > Hi, > > I'm trying to write a pylint checker and I have a problem. > Based on several examples found on internet, I wrote a checker skeleton. > It is loaded, but it never get called to check. > In the following example, the '__init__()' method is called, but other > methods 'open()', 'visit_class()', 'visit_function()' and 'visit_callfunc()' > are never called. > > As the checker is loaded, it's not a problem in the pylint command. > > Do you have any clues to solve that problem ? > > > > > Here are the 3 files (all stored in the same folder): > first, the checker : "fields_checker.py" > 8<----------------------------------------- > import astroid > from pylint.interfaces import IAstroidChecker > from pylint.checkers import BaseChecker > > class MyFieldsChecker(BaseChecker): > """Checks for my fields > """ > > __implements__ = (IAstroidChecker,) > > name = 'my-fields-checker' > msgs = {} > > def __init__(self, linter=None): > BaseChecker.__init__(self, linter) > print("MyFieldsChecker.__init__()") > > def open(self): > print("MyFieldsChecker.open() ") > > def visit_attribute(self, node): > print("MyFieldsChecker.visit_Attribute : {}".format(dir(node))) > self.generic_visit(node) > > > def visit_class (self, node): > print("MyFieldsChecker.visit_class : {}".format(dir(node))) > self.generic_visit(node) > > def visit_function(self, node): > print("MyFieldsChecker.visit_function : {}".format(dir(node))) > self.generic_visit(node) > > > def visit_callfunc(self, node): > > print("MyFieldsChecker.visit_callfunc : {}".format(dir(node))) > self.generic_visit(node) > > > def register(linter): > """required method to auto register this checker """ > print("DEBUG register MyFieldsChecker") > linter.register_checker(MyFieldsChecker(linter)) > 8<----------------------------------------- > > then the pylint command, executed on Ubuntu 14.04 : "do.sh" > 8<----------------------------------------- > PYTHONPATH=${PYTHONPATH}:$(pwd) > export PYTHONPATH > > pylint --load-plugins=fields_checker -r n test.py > 8<----------------------------------------- > > > and just fyi, the tested python file : "test.py" > > 8<----------------------------------------- > def method1(p, q, r): > print p, q, r > > method1('a', 'b', 'c') > > class Test(object): > > def __init__(self): > self.f1 = "a" > > > _myfields = { > 'f2' : "azerty", > } > > t = Test() > 8<----------------------------------------- > > and the result : > 8<----------------------------------------- > $ sh do.sh > DEBUG register MyFieldsChecker > MyFieldsChecker.__init__() > ************* Module test > C: 1, 0: Missing module docstring (missing-docstring) > C: 3, 0: Invalid argument name "p" (invalid-name) > C: 3, 0: Invalid argument name "q" (invalid-name) > C: 3, 0: Invalid argument name "r" (invalid-name) > C: 3, 0: Missing function docstring (missing-docstring) > C: 12, 8: Invalid attribute name "f1" (invalid-name) > C: 9, 0: Missing class docstring (missing-docstring) > R: 9, 0: Too few public methods (0/2) (too-few-public-methods) > C: 21, 0: Invalid constant name "t" (invalid-name) > 8<----------------------------------------- > > > > Thanks, > > Michel > _______________________________________________ > code-quality mailing list > code-quality at python.org > https://mail.python.org/mailman/listinfo/code-quality Hi Michel, Your checker needs to define at least one message in order to be executed. For instance, adding a dummy msg such as msgs = {'E9999': ('a', 'b', 'c')} makes it run as expected. Hope this helps, Claudiu. From renon at mr-consultant.net Tue Oct 20 13:40:08 2015 From: renon at mr-consultant.net (Michel RENON) Date: Tue, 20 Oct 2015 13:40:08 +0200 Subject: [code-quality] Fwd: Re: Question about pylint plugin In-Reply-To: <56261ED8.3040908@mr-consultant.net> References: <56261ED8.3040908@mr-consultant.net> Message-ID: <56262818.5000702@mr-consultant.net> [resent because I forgot to answer to list] > [...] > Hi Michel, > > Your checker needs to define at least one message in order > to be executed. For instance, adding a dummy msg such as > msgs = {'E9999': ('a', 'b', 'c')} makes it run as expected. > > > Hope this helps, > Claudiu. > Thanks a lot !! A simple warning ("no message defined in checker") would have saved me hours of debug ! Should I file a bug/request ? Michel From sylvain.thenault at logilab.fr Wed Oct 21 13:52:00 2015 From: sylvain.thenault at logilab.fr (Sylvain =?utf-8?B?VGjDqW5hdWx0?=) Date: Wed, 21 Oct 2015 13:52:00 +0200 Subject: [code-quality] Moving pylint/astroid to GitHub In-Reply-To: <20151016155134.GH29343@tonks> References: <20151016155134.GH29343@tonks> Message-ID: <20151021115200.GK1450@logilab.fr> Hi, at Logilab, we've been involved for years with mercurial development and we fight daily against the centralized model offered by github, among others. The latter explains why we've self-hosted pylint for such a long time even if the UI didn't reach the level of other well-known platforms. Unfortunaly, I still fail to see a lot of counter arguments against the rationales exposed by Florian and we already have to admit that the switch to bitbucket has been a success, as it has allowed a new generation of developpers to take over pylint's development and making it even more successful. So if you, people who make the project alive today, feel like it has to be done, go with it. Even if it makes me, and maybe a few others, sad. Still, if there is some options to use e.g. gitlab with a mirroring to github or alike which keeps the expected benefit but without the centralized model, I would like to have them considered. This maybe of interest for others PyCQA projects. Anyway, whatever the move, if we go out of bitbucket I would rather benefit from the opportuntiy to put pylint under the PyCQA umbrella as proposed by Ian. Cheers, -- Sylvain Th?nault, LOGILAB, Paris (01.45.32.03.12) - Toulouse (05.62.17.16.42) Formations Python, Debian, M?th. Agiles: http://www.logilab.fr/formations D?veloppement logiciel sur mesure: http://www.logilab.fr/services CubicWeb, the semantic web framework: http://www.cubicweb.org From graffatcolmingov at gmail.com Wed Oct 21 16:33:48 2015 From: graffatcolmingov at gmail.com (Ian Cordasco) Date: Wed, 21 Oct 2015 09:33:48 -0500 Subject: [code-quality] Moving pylint/astroid to GitHub In-Reply-To: <20151021115200.GK1450@logilab.fr> References: <20151016155134.GH29343@tonks> <20151021115200.GK1450@logilab.fr> Message-ID: On Wed, Oct 21, 2015 at 6:52 AM, Sylvain Th?nault wrote: > Hi, > > at Logilab, we've been involved for years with mercurial development and we > fight daily against the centralized model offered by github, among others. The > latter explains why we've self-hosted pylint for such a long time even if the UI > didn't reach the level of other well-known platforms. Unfortunaly, I still fail > to see a lot of counter arguments against the rationales exposed by Florian and > we already have to admit that the switch to bitbucket has been a success, as it > has allowed a new generation of developpers to take over pylint's development > and making it even more successful. So if you, people who make the project alive > today, feel like it has to be done, go with it. Even if it makes me, and maybe a > few others, sad. > > Still, if there is some options to use e.g. gitlab with a mirroring to github or > alike which keeps the expected benefit but without the centralized model, I > would like to have them considered. This maybe of interest for others PyCQA > projects. Using GitLab and mirroring to GitHub is a definite option. PyCQA already has an organization there and mirrors a few repos to GitHub. That said, I maintain a Jenkins infrastructure for those projects so I can run CI on the merge requests received through GitLab. GitLab only recently launched their own CI service and I haven't had time to investigate it at all. Travis CI is most certainly a lot less to manage if they move to GitHub. (Note that Flake8 has Travis enabled in the event someone sends a PR through GitHub.) Like I said, I won't try to sway either way, but I would vastly prefer if Travis supported GitLab as well, but they don't and probably never will. Cheers, Ian From lsanmartinr at gmail.com Thu Oct 22 03:00:55 2015 From: lsanmartinr at gmail.com (Luis San Martin) Date: Wed, 21 Oct 2015 22:00:55 -0300 Subject: [code-quality] flake8 && python 3.5.0 Message-ID: Hello, It seems asyncio syntax is not considered for python 3.5. I couldn't find any reported issue regarding this i.e. I'm on flake8 (2.4.1) with python 3.5.0. Just cloned https://github.com/dabeaz/curio.git and got this. pathcl at sid:~/src/curio$ flake8 ./curio/file.py Traceback (most recent call last): File "/home/pathcl/.pyenv/versions/3.5.0/bin/flake8", line 11, in sys.exit(main()) File "/home/pathcl/.pyenv/versions/3.5.0/lib/python3.5/site-packages/flake8/main.py", line 33, in main report = flake8_style.check_files() File "/home/pathcl/.pyenv/versions/3.5.0/lib/python3.5/site-packages/pep8.py", line 1672, in check_files runner(path) File "/home/pathcl/.pyenv/versions/3.5.0/lib/python3.5/site-packages/flake8/engine.py", line 95, in input_file return fchecker.check_all(expected=expected, line_offset=line_offset) File "/home/pathcl/.pyenv/versions/3.5.0/lib/python3.5/site-packages/pep8.py", line 1412, in check_all self.check_ast() File "/home/pathcl/.pyenv/versions/3.5.0/lib/python3.5/site-packages/pep8.py", line 1358, in check_ast checker = cls(tree, self.filename) File "/home/pathcl/.pyenv/versions/3.5.0/lib/python3.5/site-packages/flake8/_pyflakes.py", line 43, in __init__ withDoctest=self.withDoctest) File "/home/pathcl/.pyenv/versions/3.5.0/lib/python3.5/site-packages/pyflakes/checker.py", line 294, in __init__ self.handleChildren(tree) File "/home/pathcl/.pyenv/versions/3.5.0/lib/python3.5/site-packages/pyflakes/checker.py", line 547, in handleChildren self.handleNode(node, tree) File "/home/pathcl/.pyenv/versions/3.5.0/lib/python3.5/site-packages/pyflakes/checker.py", line 589, in handleNode handler(node) File "/home/pathcl/.pyenv/versions/3.5.0/lib/python3.5/site-packages/pyflakes/checker.py", line 812, in CLASSDEF self.handleNode(stmt, node) File "/home/pathcl/.pyenv/versions/3.5.0/lib/python3.5/site-packages/pyflakes/checker.py", line 588, in handleNode handler = self.getNodeHandler(node.__class__) File "/home/pathcl/.pyenv/versions/3.5.0/lib/python3.5/site-packages/pyflakes/checker.py", line 458, in getNodeHandler self._nodeHandlers[node_class] = handler = getattr(self, nodeType) AttributeError: 'FlakesChecker' object has no attribute 'ASYNCFUNCTIONDEF' What is going wrong? -- Luis San Martin R. User #333411 linuxcounter.net From linus at etnolit.se Thu Oct 22 12:31:13 2015 From: linus at etnolit.se (=?utf-8?Q?Linus_T=C3=B6rmgren?=) Date: Thu, 22 Oct 2015 12:31:13 +0200 Subject: [code-quality] Flake8 in python script? Message-ID: <9813CB38-2CF6-46D1-9C02-C9A7BE773A37@etnolit.se> Hi, I would like to use flake8 from within Python script but I can't find any hint in the docs on how to do this? For instance, with pylint I can do a "from pylint import epylint as lint" and then run the linter with "lint.run()". Kind regards Linus T?rngren From peter.bittner at gmx.net Thu Oct 22 16:08:19 2015 From: peter.bittner at gmx.net (Peter Bittner) Date: Thu, 22 Oct 2015 16:08:19 +0200 Subject: [code-quality] Flake8 in python script? In-Reply-To: <9813CB38-2CF6-46D1-9C02-C9A7BE773A37@etnolit.se> References: <9813CB38-2CF6-46D1-9C02-C9A7BE773A37@etnolit.se> Message-ID: Maybe like this? ``` from flake8.main import main main() ``` # taken from: https://gitlab.com/pycqa/flake8/blob/master/flake8/__main__.py Or be inspired by `main()` and `run()` in the `flake8.main` module: https://gitlab.com/pycqa/flake8/blob/master/flake8/main.py#L22 HTH, Peter 2015-10-22 12:31 GMT+02:00 Linus T?rmgren : > Hi, > I would like to use flake8 from within Python script but I can't find any hint in the docs on how to do this? For instance, with pylint I can do a "from pylint import epylint as lint" and then run the linter with "lint.run()". > > Kind regards > Linus T?rngren From graffatcolmingov at gmail.com Thu Oct 22 17:04:59 2015 From: graffatcolmingov at gmail.com (Ian Cordasco) Date: Thu, 22 Oct 2015 10:04:59 -0500 Subject: [code-quality] Flake8 in python script? In-Reply-To: References: <9813CB38-2CF6-46D1-9C02-C9A7BE773A37@etnolit.se> Message-ID: On Thu, Oct 22, 2015 at 9:08 AM, Peter Bittner wrote: > Maybe like this? > > ``` > from flake8.main import main > > main() > ``` This is easily the most correct way of doing it. Notice that it's not exactly a public API and we do not return anything. You'll have to wrap it in ``` from flake8 import main as flake8 try: flake8.main() except SystemExit: # Whatever handling you want ``` If you do not want flake8 to quit your script for you. From graffatcolmingov at gmail.com Thu Oct 22 17:10:06 2015 From: graffatcolmingov at gmail.com (Ian Cordasco) Date: Thu, 22 Oct 2015 10:10:06 -0500 Subject: [code-quality] flake8 && python 3.5.0 In-Reply-To: References: Message-ID: On Wed, Oct 21, 2015 at 8:00 PM, Luis San Martin wrote: > Hello, > > It seems asyncio syntax is not considered for python 3.5. I couldn't > find any reported issue regarding this > > i.e. > > I'm on flake8 (2.4.1) with python 3.5.0. Just cloned > https://github.com/dabeaz/curio.git and got this. > > pathcl at sid:~/src/curio$ flake8 ./curio/file.py > > Traceback (most recent call last): > File "/home/pathcl/.pyenv/versions/3.5.0/bin/flake8", line 11, in > sys.exit(main()) > File "/home/pathcl/.pyenv/versions/3.5.0/lib/python3.5/site-packages/flake8/main.py", > line 33, in main > report = flake8_style.check_files() > File "/home/pathcl/.pyenv/versions/3.5.0/lib/python3.5/site-packages/pep8.py", > line 1672, in check_files > runner(path) > File "/home/pathcl/.pyenv/versions/3.5.0/lib/python3.5/site-packages/flake8/engine.py", > line 95, in input_file > return fchecker.check_all(expected=expected, line_offset=line_offset) > File "/home/pathcl/.pyenv/versions/3.5.0/lib/python3.5/site-packages/pep8.py", > line 1412, in check_all > self.check_ast() > File "/home/pathcl/.pyenv/versions/3.5.0/lib/python3.5/site-packages/pep8.py", > line 1358, in check_ast > checker = cls(tree, self.filename) > File "/home/pathcl/.pyenv/versions/3.5.0/lib/python3.5/site-packages/flake8/_pyflakes.py", > line 43, in __init__ > withDoctest=self.withDoctest) > File "/home/pathcl/.pyenv/versions/3.5.0/lib/python3.5/site-packages/pyflakes/checker.py", > line 294, in __init__ > self.handleChildren(tree) > File "/home/pathcl/.pyenv/versions/3.5.0/lib/python3.5/site-packages/pyflakes/checker.py", > line 547, in handleChildren > self.handleNode(node, tree) > File "/home/pathcl/.pyenv/versions/3.5.0/lib/python3.5/site-packages/pyflakes/checker.py", > line 589, in handleNode > handler(node) > File "/home/pathcl/.pyenv/versions/3.5.0/lib/python3.5/site-packages/pyflakes/checker.py", > line 812, in CLASSDEF > self.handleNode(stmt, node) > File "/home/pathcl/.pyenv/versions/3.5.0/lib/python3.5/site-packages/pyflakes/checker.py", > line 588, in handleNode > handler = self.getNodeHandler(node.__class__) > File "/home/pathcl/.pyenv/versions/3.5.0/lib/python3.5/site-packages/pyflakes/checker.py", > line 458, in getNodeHandler > self._nodeHandlers[node_class] = handler = getattr(self, nodeType) > AttributeError: 'FlakesChecker' object has no attribute 'ASYNCFUNCTIONDEF' > > What is going wrong? Flake8 takes the somewhat controversial stance of being stable rather than being able to handle all the things in one version. The 2.4.x series of Flake8 restricts itself to known working versions of pep8 and pyflakes (neither of which can handle 3.5 or the new syntax added in it). Flake8 2.5.0 will raise the cap on pyflakes to allow this to work but there is no current release of pep8 that is compatible with the version specifier that Flake8 carries for stability and will also work with Python 3.5.0 (note, you will merely see a Deprecation Warning due to currently released versions of pep8 using inspect.getargspec which is fixed in master). Because of how late in the week it is, I'm going to put off a Flake8 2.5.0 release until Monday so that in the event this causes people's continuous integration to fail, they're not scrambling to do it tomorrow or over the weekend. (See also responsible release practices.) Cheers, Ian From me at the-compiler.org Fri Oct 23 07:10:44 2015 From: me at the-compiler.org (Florian Bruhin) Date: Fri, 23 Oct 2015 13:10:44 +0200 Subject: [code-quality] Moving pylint/astroid to GitHub In-Reply-To: <20151016155134.GH29343@tonks> References: <20151016155134.GH29343@tonks> Message-ID: <20151023111044.GF5929@tonks> * Florian Bruhin [2015-10-16 17:51:34 +0200]: > what do you think about moving pylint and astroid from Bitbucket/hg to > GitHub/git? I've briefly talked with Claudiu about this, and he seems > open to the idea and suggested I write this mail :) Thanks for all your answers! Claudiu and I agree it'll be a good idea to move it to the PyCQA organization on on GitHub. I'll wait until after the next pylint/astroid release as hopefully the PRs will have cooled down a bit until then. :) Florian -- http://www.the-compiler.org | me at the-compiler.org (Mail/XMPP) GPG: 916E B0C8 FD55 A072 | http://the-compiler.org/pubkey.asc I love long mails! | http://email.is-not-s.ms/ -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: From carl.crowder at gmail.com Fri Oct 23 07:39:26 2015 From: carl.crowder at gmail.com (Carl Crowder) Date: Fri, 23 Oct 2015 13:39:26 +0200 Subject: [code-quality] Flake8 in python script? In-Reply-To: References: <9813CB38-2CF6-46D1-9C02-C9A7BE773A37@etnolit.se> <5FF28E45-833F-4D79-9D01-62F949B0C11D@etnolit.se> Message-ID: Hi all, author of Prospector here. It's definitely not an alternative to pylint or flake8, it's just a convenience wrapper. The entire point was just to make it a bit easier to get started as not everyone wants to spend the time configuring every tool. The idea is to be a "gateway drug" to bridge the gap between no code quality tooling and having everything configured perfectly for your particular project. As a "code quality newbie" you're sort of the target market, but I encourage you to dig deeper if you get benefits from prospector as you will get more benefits by tuning each tool yourself to fit your particular style of coding! Cheers, Carl On 22 October 2015 at 21:27, Linus T?rngren wrote: > I do, but as I understand it prospector aggregates (optionally) the results > of pylint, pyflakes, mccabe, dodgy, pep8 and pep257. It also has a bunch of > profiles with settings for the different tools. That?s attractive for a code > quality newbie like me. > > 22 okt. 2015 kl. 21:16 skrev Claudiu Popa : > > On Thu, Oct 22, 2015 at 8:03 PM, Peter Bittner > wrote: > > Strictly speaking, Prospector isn't an alternative to flake8, but to > PyLint. The verbosity of PyLint with default settings is the main > critique of Prospector's author. He's running a nice service, by the > way, Landscape. Very nice and free for Open Source projects. > https://landscape.io/ > > > You do realize that Prospector is using Pylint as its underlying > technology? Can't really consider it an alternative in this case: > http://prospector.readthedocs.org/en/master/ > > > > _______________________________________________ > code-quality mailing list > code-quality at python.org > https://mail.python.org/mailman/listinfo/code-quality > From graffatcolmingov at gmail.com Sun Oct 25 22:01:25 2015 From: graffatcolmingov at gmail.com (Ian Cordasco) Date: Sun, 25 Oct 2015 21:01:25 -0500 Subject: [code-quality] Moving pylint/astroid to GitHub In-Reply-To: <20151023111044.GF5929@tonks> References: <20151016155134.GH29343@tonks> <20151023111044.GF5929@tonks> Message-ID: On Fri, Oct 23, 2015 at 6:10 AM, Florian Bruhin wrote: > * Florian Bruhin [2015-10-16 17:51:34 +0200]: >> what do you think about moving pylint and astroid from Bitbucket/hg to >> GitHub/git? I've briefly talked with Claudiu about this, and he seems >> open to the idea and suggested I write this mail :) > > Thanks for all your answers! > > Claudiu and I agree it'll be a good idea to move it to the PyCQA > organization on on GitHub. > > I'll wait until after the next pylint/astroid release as hopefully the > PRs will have cooled down a bit until then. :) > > Florian That's awesome to hear! Feel free to email me off list to coordinate making you both admins and getting the project set up. Cheers, Ian From gozdal at gmail.com Fri Oct 30 04:14:29 2015 From: gozdal at gmail.com (Marcin Gozdalik) Date: Fri, 30 Oct 2015 08:14:29 +0000 Subject: [code-quality] Reporting a bug in pyflakes Message-ID: Hi I'd like to report a bug in pyflakes (I erroneously reported it against flake8 - https://gitlab.com/pycqa/flake8/issues/96), but it seems that https://github.com/pyflakes/pyflakes/issues only allows pull requests. How should I report bug in pyflakes? Best regards, Marcin -------------- next part -------------- An HTML attachment was scrubbed... URL: From me at the-compiler.org Fri Oct 30 08:05:35 2015 From: me at the-compiler.org (Florian Bruhin) Date: Fri, 30 Oct 2015 13:05:35 +0100 Subject: [code-quality] Reporting a bug in pyflakes In-Reply-To: References: Message-ID: <20151030120535.GX5929@tonks> * Marcin Gozdalik [2015-10-30 08:14:29 +0000]: > Hi > > I'd like to report a bug in pyflakes (I erroneously reported it against > flake8 - https://gitlab.com/pycqa/flake8/issues/96), but it seems that > https://github.com/pyflakes/pyflakes/issues only allows pull requests. How > should I report bug in pyflakes? Seems like the bug tracker lives on launchpad: https://bugs.launchpad.net/pyflakes Florian -- http://www.the-compiler.org | me at the-compiler.org (Mail/XMPP) GPG: 916E B0C8 FD55 A072 | http://the-compiler.org/pubkey.asc I love long mails! | http://email.is-not-s.ms/ -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: