pylint
pylint copied to clipboard
Add message `name-is-parameter-and-nonlocal`
Current problem
The following produces a SyntaxError:
def tomato(is_tasty: bool = True):
nonlocal is_tasty
python example.py
File "/Users/markbyrne/programming/example.py", line 2
nonlocal is_tasty
^^^^^^^^^^^^^^^^^
SyntaxError: name 'is_tasty' is parameter and nonlocal
Desired solution
Create a new message in Pylint and emit it in this scenario indicating the error.
Additional context
No response