-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing comma in list values lint #1589
Comments
The problem with this check is that it can result in a lot of false positives. How should you figure out that the string concatenation is not implicitly required? We also use this pattern a lot in our codebase for example and this check will emit on those instances as if they are problematic, which in fact is not. |
Do you have such implicit string concatenation in list values or just somewhere in code? I can argue that it would be not a false positive, but a code smell. |
In tuples. But the principle remains. Why should we warn about lists and not about tuples? |
Yes, it stands for tuples too. I meant that stray values are more or less safe. |
Test case accidentally concatenated [1] list values which was noticed with the latest Pylint 2.2.2. [1] pylint-dev/pylint#1589 Signed-off-by: Heikki Laaksonen <[email protected]>
Steps to reproduce
Current behavior
No warning
Expected behavior
It should probably be reported.
String values get silently concatenated because of missing comma. This is most certainly not what user wanted or expected.
pylint --version output
pylint 1.7.2,
astroid 1.5.3
Python 2.7.12 (default, Sep 20 2016, 14:05:04)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-4)]
The text was updated successfully, but these errors were encountered: