How many locals is ok? R0914 vs. WPS210 #702
Unanswered
cidrblock
asked this question in
Linters, linting, formatting, pre-commit, CI
Replies: 1 comment 1 reply
-
In general, a smaller amount of locals results in easier-to-understand smaller functions that may also be composable and most likely pure. So lower is better. But depending on the project it may make sense to use different defaults sometimes if it's hard to produce simple code. At least, temporarily, that is. Can you link the reasoning both linters have for this? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
WPS210 defaults to 5:
(https://wemake-python-stylegui.de/en/latest/pages/usage/violations/complexity.html#wemake_python_styleguide.violations.complexity.TooManyLocalsViolation)
but pylint is set to 16:
(http://pylint-messages.wikidot.com/messages:r0914)
I believe they are checking the same thig, but have different thresholds
Beta Was this translation helpful? Give feedback.
All reactions