$ cat c0103.py
"""Test for duplicate C0103."""
def my_function(long_variable_name_is_really_too_long=False):
"""Test."""
return long_variable_name_is_really_too_long
$ pylint --include-ids=y --report=n c0103.py
No config file found, using default configuration
************* Module c0103test
C0103: 3:my_function: Invalid name "long_variable_name_is_really_too_long" (should match [a-z_][a-z0-9_]{2,30}$)
C0103: 3:my_function: Invalid name "long_variable_name_is_really_too_long" (should match [a-z_][a-z0-9_]{2,30}$)
Further debugging suggests that it's being flagged both as an invalid argument and an invalid local variable name, which makes sense as the two can be different, but seems redundant when they are defined to have the same regex. Maybe only one should be flagged? | |
| priority | minor |
|---|---|
| type | bug |
| appeared in | <not specified> |
| done in | 0.25.2 |
| load | 0.200 |
| load left | 0.200 |
| closed by | <not specified> |


#9868 pylint crash on erratic colons
Comments
-
2011/07/08 18:07, written by hsebastian
| reply to this comment
(add comment)reproduced but getting 0 and 16. not sure what that means
(pylintbugsday)[hsebastian@hans-l src]$ pylint/bin/pylint --include-ids=y --report=n c0103.py
No config file found, using default configuration
************* Module c0103
C0103: 3,0:my_function: Invalid name "long_variable_name_is_really_too_long" (should match [a-z_][a-z0-9_]{2,30}$)
C0103: 3,16:my_function: Invalid name "long_variable_name_is_really_too_long" (should match [a-z_][a-z0-9_]{2,30}$)