-
Notifications
You must be signed in to change notification settings - Fork 93
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
Incorrect highlighting of a call with preceding __getitem__ #197
Comments
Correctly identify calls of the form "foo[123](bar=2)" to highlight the contents of the parentheses as call arguments. Issue: #197
I have a solution for better kwargs detection. Regarding the class definition I need a better idea of what's the expectation here. Technically everything that appears in the parentheses after the class name is part of the class inheritance. It could be a simple identifier ( |
Can we just handle the |
Perhaps you misunderstand me. This is not a question of how technically hard the solution is - it's comparable complexity, regardless of what we choose here. This is a question of what kind of consistency we want to show. So by default I would think that every argument in class definition is definitely another class semantically, regardless of how obscure the expression. So I would tend to suggest that we can then just wrap all arguments in We can special-case only this one, but it's not saving me any work and I'd prefer to not make an exception. So unless you have strong opposition to calling the entire argument as |
How would the blanket approach highlight this: class FooMeta(type(Bar)):
pass ? |
The entire This is similar to how strings are highlighted where the entire string has a common "string" scope and then parts of it may have additional scopes (like escape sequences). |
OK that seems fine to me. |
Observe the differences in highlighting of the keyword argument names below:
The text was updated successfully, but these errors were encountered: