intellisense

Weird scikit-learn Python intellisense error message

Weird scikit-learn Python intellisense error message Question: Lately I was doing some ML stuff with Python using scikit-learn package. I wanted to use make_blobs() function so I began writing code for example: X, y = make_blobs(n_samples=m, centers=2, n_features=2, center_box=(80, 100)) and of course this is fine. However while coding next lines my Intellisense within Visual …

Total answers: 2

Expressing semantic content of tuple values in type annotations

Expressing semantic content of tuple values in type annotations Question: I’m modeling a financial exchange class Exchange(ABC): @abstractproperty def balances(self) -> Dict[str, Tuple[float, float]]: … The semantic content of .balances return type is a dict that is {asset: (quantity, proportion), …} e.g. {"BTC": (0.0015, .30), "ETH": (0.10, .20), "LTC": (5, .50)} The problem is that …

Total answers: 1

Forward function signature in VSCode

Forward function signature in VSCode Question: Say I have a function in src/f1.py with the following signature: def my_func(a1: int, a2: bool) -> float: … In a separate file src/f2.py I create a dictionary: from src.f1 import my_func my_dict = { "func": my_func } In my final file src/test1.py I call the function: from src.f2 …

Total answers: 1

"None" in Python code breaks code suggestions in vscode

"None" in Python code breaks code suggestions in vscode Question: [ This was a bug in vscode < v1.71, see my comment with additional screenshots. ] I’ve got a weird issue in vscode. For some reason, code completion of c. stops working after the first None in the Python code, as shown in below screenshot. …

Total answers: 4

Intellisense for Python APSW

Intellisense for Python APSW Question: System specs Windows 10 Pro x64 Python 3.10.2 x64 APSW 3.37.0 Visual Studio Code 1.63.2 Intellisense works for Python and all imported modules except for APSW. APSW does work, and executing dir(apsw) Will yield all constants, functions, properties, etc contained in the apsw module, just no intellisense. My settings.json file …

Total answers: 1

VSCode. Pylance doesn't work via SSH connection

VSCode. Pylance doesn't work via SSH connection Question: There is a problem: Pylance (IntelliSense) does not work on the remote server. At the same time it works locally. Pylance itself is installed both locally and on the server. Imports are just white and only "Loading…" pops up when I hover over it. "Go to definition" …

Total answers: 2

Visual Studio Code Intellisense is very slow – Is there anything I can do?

Visual Studio Code Intellisense is very slow – Is there anything I can do? Question: Edit: Pylance seems to be much better at this and has so far resolved all problems with the previous Python language server from Microsoft. I’m using VS Code and it’s wonderful is all areas but code completion, where it is …

Total answers: 19

How to enable intellisense for python in Visual Studio Code with anaconda3?

How to enable intellisense for python in Visual Studio Code with anaconda3? Question: I’ve been using Visual Studio Community for a few months now, but the sluggishness and project-based interface is not to my liking and having seen that Visual Studio Code has a python extension, I decided to try Code again. There are two …

Total answers: 6

Python and Intellisense

Python and Intellisense Question: Is there an equivalent to ‘intellisense’ for Python? Perhaps i shouldn’t admit it but I find having intellisense really speeds up the ‘discovery phase’ of learning a new language. For instance switching from VB.net to C# was a breeze due to snippets and intellisense helping me along. Asked By: Andrew Harry …

Total answers: 16