Open
Description
Current problem
- I have a long list of keywords to a method, that I want to define for type hints
- I need to pass these to another method as a dictionary, using
locals()
- pylint detects possibly unused variables, but not arguments
Desired solution
- pylint should extend the logic used around unused argument and variable definitions to consider arguments as potentially unused as well
Additional context
Here is an example function that makes use of local scope variables and arguments.
def example(arg_a='a', arg_b='b'): # unused-argument
"""An example function."""
var_c = 'c' # potentially-unused-variable
return locals() # {'arg_a': 'a', 'arg_b': 'b', 'var_c': 'c'}