When using not isinstance() to check if a variable is of the required type/s, Pylance incorrectly reports the indented code block as unreachable. Environment data Language Server version: 2024.7.1 ...
Der Python-Language-Server #Pylance, eine von #Microsoft entwickelte Extension für Visual Studio Code, enthält eine waschechte #ReDoS-Attacke (regular expression denial of service).
Kern des Angriffs ist ein regulärer Ausdruck (siehe Screenshot), der offenbar dazu gedacht ist, Debugger-Prozesse in eine Quasi-Endlos-Busy-Loop-Falle mit 100% CPU-Auslastung laufen zu lassen.
Zwar lässt sich die Attacke mit minimalem Aufwand unschädlich machen, aber: heilige Scheiße! Solche Aktionen sind eines billionenschweren Tech-Konzerns mehr als unwürdig.
Anyone know how to make #vscode and #python ( #pylance) actually be aggressive about respecting "extraPaths" settings? If I open files in the folder I've given as an absolute path, they autocomplete, but if I reference those modules from my own project, the classes are invisible.
I hate having squiggles because they block discoverability
If #pylance includes a wrong typing for a function, where do I have to open the ticket? Pylance or the #typeshed project?
The definition from calendar.pyi is basically wrong as the function returns actually list[list[list[date]]].
```python
def yeardatescalendar(self, year: int, width: int = 3) -> list[list[int]]: ...
```
Apparently, #pylance can now be configured to automatically create an f-string when a { is added to a string.
Currently disabled by default; can be enabled at the "python.analysis.autoFormatStrings" setting in #VSCode once the May Update has been installed.
https://devblogs.microsoft.com/python/python-in-visual-studio-code-may-2023-release/
The May 2023 release of the Python and Jupyter extensions for Visual Studio Code are now available. In this release, Jupyter is no longer installed alongside the Python extension, microvenv support was added for the Create Environment command, new automatic conversion of f-strings, and code navigation on strings that contain module names. Keep reading to learn more!
I hope that I'm not the only one excited to see "Improved IntelliSense support for pytest" in the latest release notes for Visual Studio Code