Closed ghost closed 7 years ago
By the way, just for the sake of completeness, you can use either numbers or symbolic names (as you did in your example, see http://docs.pylint.org/faq.html#do-i-have-to-remember-all-these-numbers for details).
Pylint can be configured with a ~/.pylintrc
file (taken from http://stackoverflow.com/a/4341833):
[MESSAGES CONTROL]
# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
# multiple time.
#enable=
# Disable the message, report, category or checker with the given id(s). You
# can either give multiple identifier separated by comma (,) or put this option
# multiple time (only on the command line, not in the configuration file where
# it should appear only once).
#disable=
More possibilities of Pylint configuration can be seen here: http://stackoverflow.com/a/32672068
Can the limit for local variables be changed this way as well? IMO using more than 15 variables in a function is not an issue. The limit should be raised to around 20.
Can the limit for local variables be changed this way as well?
Well, you can disable this check (it's R0914). Not sure if you can raise the limit.
IMO using more than 15 variables in a function is not an issue. The limit should be raised to around 20.
Depends. Using 15 variables in a function is a bit too many. I would try to refactor that code.
Well, the refactored code uses 20 variables now, some of them only for improved readability. Previously, it used more then 30 vars: https://landscape.io/github/openSUSE/suse-doc-style-checker/152/modules/src/sdsc/__init__.py#L884
I see. :smile: In that case, maybe you can use a .landscape.yml
file to suppress these warnings, see here: https://docs.landscape.io/suppressing.html
I think the original issue is solved (via "del context" thrown in every once in a while).
The rest of this issue centered around number of variables which is a bit off-topic. So, closing.
for Landscape...
#pylint: disable=unused-argument