Intellisense for Visual Studio Code - too many suggestions?

Viewed 262

I'm a C# developer normally, so maybe this is something I don't understand about Python.

I have a data model of dataclasses with < 10 child data elements in each class.

e.g. things like:

@dataclass
class Block:
    def tranmission(this) -> Transmission:
       ...

    def allocations(this) -> Generator[Allocation,Any,Any]:
       ...

    def day(this) -> Day:
       ...

so when I add a "." and look in intellisense, I'm expecting a nice short list of options, but I seem to be something more like 100.

Intellisense DOES include my methods, but they are drowning in sea of other stuff I'm not interested in and not sure why are there,

enter image description here

block.return and block.True seem to make no sense to me at all.

Why is it doing it? and how do I just see a more focused and useful list.

Ideally all the seemingly useless suggestions could be filtered out, if not, if i can prioritise my methods to the top of the list would help.


The only idea i have at the moment (which is awful) is to have a naming convention prefix for my methods, then I can find them by typing the prefix into intellisense! surely there must be a better way that this?


This only seems to effect the 'if' clause, and actually it only seems to effect me, so I'm going to live with it, and factor our if clauses into functions if it causes me a problem (its a similar issue to lambdas, that don't support type annotations)

0 Answers
Related