Open Kajiih opened 2 weeks ago
Also, I'm not sure if it is linked, but in the playground,
self
andcls
are highlighted differently:
the playground only has syntax highlighting which isn't handled by basedpyright but rather the monaco editor that it uses
While we are at it, we can also notice a difference in how the decorators are interpreted,
classmethod
andabsractmethod
are considered asfunctions
in basedpyright butclass
in Pylance. I'm not sure which one is the most logical or if it's a feature, but the basedpyright way seems the most natural to me.
yeah this was intentional and was implemented by @ValdezFOmar in #217
Thanks for the clarification!
Hi, thanks for your great work !
I'm not very familiar with the topic, but in methods and class methods,
self
andcls
are semantically considered as regular parameters in basedpyright (as opposed to Pylance).Pylance:
![image](https://github.com/user-attachments/assets/44b6e919-6e39-4d1b-82e0-29cc7a21ddf4)basepyright:
![image](https://github.com/user-attachments/assets/0f0ec6be-5bb7-4ad0-8a5b-89d5f6d4294d)So in VS Code at least, the specific highlighting is overridden by the semantic highlighting of parameters, which I think is pretty sad 😢
Also, I'm not sure if it is linked, but in the playground,
self
andcls
are highlighted differently:playground:
While we are at it, we can also notice a difference in how the decorators are interpreted,
classmethod
andabsractmethod
are considered asfunctions
in basedpyright butclass
in Pylance. I'm not sure which one is the most logical or if it's a feature, but the basedpyright way seems the most natural to me.