Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
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. |

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.


Observe the differences in highlighting of the keyword argument names below: