-
Notifications
You must be signed in to change notification settings - Fork 3
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
False positive on multiline dict inside decorator #97
Comments
If you can give me a working, minimal example and a traceback, I'll take a look at it tomorrow. |
Same issue:
but this doesn't raise error:
|
|
We also ran into this with parametrised tests, but with a bit of trial and error, I managed to reduce it to this MWE: [(
foo(
)
)] raises "foo.py:4:2: JS102 Multi-line container does not close on same column as opening." I wasn't able to reduce the example any further: for example, if I tried removing either set of outer brackets/parentheses, or putting all of I'm using version 0.0.19. (Aside: the above example also correctly raises "foo.py:1:2: JS101 Multi-line container not broken after opening character". However, breaking the outer container to [
(
foo(
)
)
] removes this JS101 error, but does still raise "foo.py:6:1: JS102 Multi-line container does not close on same column as opening".) |
After a brief investigation, it looks like (line 243) Note that (
(
foo(
)
)
) will not cause an error to be raised, even though the logic is near-identical to the above. This is because the third |
I think I'm seeing a false positive here (using v0.0.18). If I put that
data
dict in a single line, there is no warning. If I pass any other kwarg tofunc
that has a function call or tuple (in one line), there is no warning. It seems to be when there are only dicts as values like this that I get this warning. We use this pattern often for parameterized tests, and I guess I never noticed this until now because I always had some date object or tuple in the arguments as well, which made it not produce a lint warning. I'm not totally sure which is the intended behavior here, since the square brackets and curly braces in this example indeed do not open and close on the same column.The text was updated successfully, but these errors were encountered: