From esr at thyrsus.com Tue Jun 12 15:16:14 2018 From: esr at thyrsus.com (esr at thyrsus.com) Date: Tue, 12 Jun 2018 15:16:14 -0400 (EDT) Subject: [code-quality] Problems in pylint.1 Message-ID: <20180612191614.108363A4F45@snark.thyrsus.com> This is automatically generated email about markup problems in a man page for which you appear to be responsible. If you are not the right person or list, please tell me so I can correct my database. See http://catb.org/~esr/doclifter/bugs.html for details on how and why these patches were generated. Feel free to email me with any questions. Note: These patches do not change the modification date of any manual page. You may wish to do that by hand. I apologize if this message seems spammy or impersonal. The volume of markup bugs I am tracking is over five hundred - there is no real alternative to generating bugmail from a database and template. -- Eric S. Raymond -------------- next part -------------- Problems with pylint.1: Ambiguous or invalid backslash. This doesn't cause groff a problem. but it confuses doclifter and may confuse older troff implementations. --- pylint.1-unpatched 2018-05-18 08:21:03.576466143 -0400 +++ pylint.1 2018-05-18 08:21:03.392467392 -0400 @@ -231,7 +231,7 @@ .IP "--max-line-length=" Maximum number of characters on a single line. [current: 100] .IP "--ignore-long-lines=" -Regexp for a line that is allowed to be longer than the limit. [current: ^\s*(# )??$] +Regexp for a line that is allowed to be longer than the limit. [current: ^\es*(# )??$] .IP "--single-line-if-stmt=" Allow the body of an if to be on the same line as the test if there is no else. [current: no] .IP "--no-space-check=NO_SPACE_CHECK" From federico.bond at gmail.com Tue Jun 26 18:15:44 2018 From: federico.bond at gmail.com (Federico Bond) Date: Wed, 27 Jun 2018 00:15:44 +0200 Subject: [code-quality] pylint-unittest plugin to detect less than optimal usage of assertions in your unittest usage Message-ID: Hello, I wrote a Pylint plugin to detect less than optimal usage of unittest assertions, for example writing self.assertEqual(x, None) instead of self.assertIsNone(x) or using deprecated aliases. It's published in PyPI under the name pylint-unittest and is also available on GitHub here: https://github.com/federicobond/pylint-unittest I would love to hear your feedback on it. Also, it took me longer than I expected to put together the necessary boilerplate for doing test-driven development on this plugin, so I hope it can serve as a good base for others too. I feel that the way pylint-django tests are structured is too awkward for newcomers. Thank you! Federico From jimifhcullen at gmail.com Wed Jun 27 08:52:53 2018 From: jimifhcullen at gmail.com (Jimi Cullen) Date: Wed, 27 Jun 2018 13:52:53 +0100 Subject: [code-quality] Making a new release of flake8 happen Message-ID: Dear all, There's a lot of people itching for a new version of flake8, especially since the current version on PyPI is incompatible with the latest versions of pyflakes and pycodestyle. Flake8 still works with the versions of those packages as specified in the requirements of flake8 - but in practice people are updating those packages regardless and running into problems with flake8. Plus it would just be nice to have an update and be able to use the new features and bux fixes of those packages. I submitted a fix for compatibility with pycodestyle a while ago, which has been merged into the flake8 master branch. There are a couple of pull requests open on gitlab to get it to work with pyflakes too. What can I/we do to make a new release happen? I understand the maintainer (Ian) is extremely busy, and the community has been quite aggressively demanding of him. I am very sympathetic to his situation. Maybe the project needs additional active maintainers? I would volunteer, but I'm not qualified as: - I'm very inexperienced with open source stuff (I've only had two PRs accepted - in pycodestyle and flake8 - both with support and encouragement from Ian). - I've never put a python package together or put anything on PyPI etc. - Basically I use python every day at work, but as a financial data analyst, not building and packaging systems for others to use. Does anyone have any suggestions for how to proceed? Best wishes, Jimi Cullen -------------- next part -------------- An HTML attachment was scrubbed... URL: From me at jamescooke.info Wed Jun 27 12:21:22 2018 From: me at jamescooke.info (James Cooke) Date: Wed, 27 Jun 2018 17:21:22 +0100 Subject: [code-quality] Making a new release of flake8 happen In-Reply-To: References: Message-ID: <1530116482.1987975.1422380768.673997F8@webmail.messagingengine.com> Hi Jimi, Could you please help me to understand the issues that people are facing with the current status of Flake8? I use the project, but I do not track the issues / development. In addition, I use pip-tools for package management - this prevents conflicts between different packages requiring different versions of sub-packages, so I've not run into the conflict between pyflakes and Flake8. My guess is that you're specifically referring to this merge request https://gitlab.com/pycqa/flake8/merge_requests/239 - is that right? If that is the case, and you're happy with the code in that MR, then is there anything from stopping you from installing the contributor's branch with pip and using the changes directly? $ pip install git+ https://gitlab.com/hroncok/flake8.git at pyflakes_new_codes... Successfully installed flake8-3.5.0 mccabe-0.6.1 pycodestyle-2.4.0 pyflakes-2.0.0$ flake8 --version 3.5. (mccabe: 0.6.1, pycodestyle: 2.4.0, pyflakes: 2.0.0) CPython 3.5.2 on Linux The advantages of this approach would be that you can remove dependence on PyPI and a new release of Flake8 - you can start using those code changes immediately. In addition, by running that branch against your codebase, you'll also be able to feed back on any issues that you find. I've installed that branch locally and it seems to run fine, but I've not done anything more detailed than that. Cheers, James On Wed, 27 Jun 2018, at 1:52 PM, Jimi Cullen wrote: > Dear all, > > There's a lot of people itching for a new version of flake8, > especially since the current version on PyPI is incompatible with the > latest versions of pyflakes and pycodestyle. Flake8 still works with > the versions of those packages as specified in the requirements of > flake8 - but in practice people are updating those packages regardless > and running into problems with flake8. Plus it would just be nice to > have an update and be able to use the new features and bux fixes of > those packages.> > I submitted a fix for compatibility with pycodestyle a while ago, > which has been merged into the flake8 master branch. There are a > couple of pull requests open on gitlab to get it to work with > pyflakes too.> > What can I/we do to make a new release happen? > > I understand the maintainer (Ian) is extremely busy, and the community > has been quite aggressively demanding of him. I am very sympathetic to > his situation.> > Maybe the project needs additional active maintainers? I would > volunteer, but I'm not qualified as:> - I'm very inexperienced with open source stuff (I've only had two PRs > accepted - in pycodestyle and flake8 - both with support and > encouragement from Ian).> - I've never put a python package together or put anything on > PyPI etc.> - Basically I use python every day at work, but as a financial data > analyst, not building and packaging systems for others to use.> > Does anyone have any suggestions for how to proceed? > > Best wishes, > > Jimi Cullen > _________________________________________________ > 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 atodorov at mrsenko.com Fri Jun 29 06:44:08 2018 From: atodorov at mrsenko.com (Alexander Todorov) Date: Fri, 29 Jun 2018 13:44:08 +0300 Subject: [code-quality] Need help: pylintrc breaks black_list from plugins In-Reply-To: <68b4429c-7438-bae1-9e58-6cc42e0c3bd9@otb.bg> References: <68b4429c-7438-bae1-9e58-6cc42e0c3bd9@otb.bg> Message-ID: <89589f7c-ca50-42be-a0ee-81a5d3ec943c@mrsenko.com> Hi folks, according to this bug report: https://github.com/PyCQA/pylint-django/issues/167#issuecomment-401304800 when there is a .pylintrc file with an ignore line inside of it it this overrides the black_list options configured by plugins. In the case of pylint_django we would like to ignore some directories (like migrations) and this breaks. In pylint_django we have: def register(linter): linter.config.black_list += ('migrations', 'south_migrations') and from what I can tell after this is set something calls OptionsProviderMixIn.set_option and overrides it afterwards. Is that a desired behavior or a bug? If this is a bug where should I look if I want to contribute a patch ? Regards, Alex