Are you ready for PYLINT?

As soon as this PR is merged, adhering to pylint code conventions will be required before any further PRs can be merged into NuPIC.

I think this will help out a lot with code reviews, because anyone creating a PR (including current committers, reviewers, and Numenta folks) must lint their code and fix problems before merging.

If anyone has a problem with this, speak now or forever hold your peace.

Pylint is now run on every PR. Most python IDEs have tooling for pylint, so you can automate the code formatting or at least have it call out all the pylint issues. Here’s an example for PyCharm.

Late to the party but there are 2 potential problems:

  • I think large pylint changes should be commited in a separate PRs, it really hides the logic of a PR if there are too many style-changes (which are otherwise meaningless)

  • Poor one who will have to make a change that requires a small modification in 35x places where the class is instantiated, requiring them to clean up all those files :stuck_out_tongue:

Hey Marek, when you have a PR that touches a lot of files next time, I’ll create a PR to merge first with pylint changes, deal? I can run pylint in my IDE to make the changes and hopefully it won’t take much effort.

1 Like

Damn, I had to turn pylint off:

https://github.com/numenta/nupic/issues/3147

I tried some of the basic solutions I found for this bug, like adding to pylintrc:

ignored-classes=SQLObject,numpy,pkg_resources
ignored-modules=numpy,pkg_resources

Unfortunately, that did not help.