Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase pylint limits for too-many-arguments and too-many-locals #770

Open
jindrahelcl opened this issue Oct 26, 2018 · 3 comments
Open
Assignees

Comments

@jindrahelcl
Copy link
Member

We should increase pylint limits for too-many-arguments and too-many-locals (which is influenced by the arguments which count as well towards this number).

For example, the current maximum of arguments is 8. Since the ModelPart parent class has five of them, this leaves almost no space for classes that are derived from this class.

The maximum number of arguments used in neuralmonkey is in the RNN decoder constructor (23) and there is a bunch of other functions with arg number > 20. The mean argument number (of those larger than 8) is around 12-15.

I propose to raise this number globally to e.g. 15 or 20, because now the pylint warning about too many arguments is just not useful and everyone is ignoring it and the code is full with pylint: disable lines..

@jindrahelcl
Copy link
Member Author

Pokud by šlo ten limit nastavit jen pro konstruktory, tak bych to udělal, ale nevim, jestli to jde a jak by se to dělalo. @tomasmcz ?

@tomasmcz
Copy link
Member

tomasmcz commented Nov 1, 2018

Nemyslím si, že Python ví, co je to konstruktor :-P
Podle mne by se věci, které mají dvacet argumentů, měly refaktorovat (zkusit smysluplně rozdělit na menší části, které se nakonfigurují zvlášť a pak se spojí). Ale na druhou stranu uznávám, že v Pythonu je to asi idiomatické -- když čtu dokumentaci k matplotlibu, jsou tam všude konstruktory s desítkami arguementů.

@jindrahelcl
Copy link
Member Author

Dvacet už je na refaktor zralý, to jo, ale osm je prostě málo skoro na všechno.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants