pylint #9967 Duplicate C0103 for keyword argument name [open]
$ 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 |
done in | <not specified> |
load | 0.200 |
load left | 0.200 |
closed by | <not specified> |
similar entities
Comments
-
2011/07/08 16:07, written by hsebastian
-
2012/09/13 09:33, written by lothiraldan
add commentreproduced 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}$)
This ticket has a patch in review https://www.logilab.org/patch/99498