python-template icon indicating copy to clipboard operation
python-template copied to clipboard

Add pylintrc

Open jspaaks opened this issue 3 years ago • 6 comments

Currently it's not clear how to make a configuration change, like for example you want 120 characters per line instead of 79. Where does this information go?

I propose we add .pylintrc from howfairis, the pylintrc there is almost default with some minor changes. Here is the PR that describes the diff from default: https://github.com/fair-software/howfairis/pull/311

jspaaks avatar May 03 '21 07:05 jspaaks

I'd like to add this to 0.4.0

jspaaks avatar May 03 '21 07:05 jspaaks

PR #271

jspaaks avatar May 03 '21 09:05 jspaaks

PR was merged #271 closing this

jspaaks avatar May 03 '21 12:05 jspaaks

Inclusion of .pylintrc caused more lint errors see #227 , I thought minor changes would not cause that many errors.

We should decide if we want those minor changes. If we do we should fix those warnings. Otherwise make pylintrc same as prospector defaults so current code is lint warning free.

sverhoeven avatar May 04 '21 07:05 sverhoeven

In the guide we recommend setting strictness to veryhigh setting for best results. However, I noticed that in this repository the setting is medium? Prospector is probably picking up the pylintrc file now (the pylint defaults are probably more like prospector's veryhigh setting), as it's just a thin wrapper around a collection of linting tools.

bouweandela avatar May 18 '21 09:05 bouweandela

This configuration should be in .prospector.yml. Perhaps that wasn't there yet when the pylintrc file was added? Btw, it has been removed by #287, so now it's just .prospector.yml. Indeed, in there, strictness is currently set to medium. I personally would also prefer having it set to veryhigh, and by the way also to add docstring linting by default. However, I realize that for starting projects, this is very annoying in practice. In the beginning, you typically don't want perfect, you just want some first results for getting started.

A good compromise might be to run prospector on strict in a separate workflow job or step, but to not fail on that, so that you aren't bothered immediately with such results. In parallel, prospector will also run in medium-strictness mode and that one will fail. We could add a "next-step" issue for activating failing on strict linting so that people will have a reminder.

egpbos avatar Mar 30 '22 11:03 egpbos