Python type checking in VS Code -




i've learned typing module in python (https://docs.python.org/3/library/typing.html) , expected use static type checking , better intellisense in vs code, works typescript, can't seem find tools/plugins that.

what options, if any?

python dynamically typed language supports duck typing. trying shoehorn static typing going exercise in futility. python vscode extension doesn't care types because can't know. shouldn't care either since types , static analysis aren't make python popular or powerful.

when reaching dynamic languages, don't tempted impose constructs other languages you've used. don't try make object, don't try type check based on class , write unit tests since happens @ runtime.

typescript accomplishes static typing on top of dynamic language @ great cost. require compilation type definitions external libraries because none of them going know types outside of runtime.

to quote own comment: basically, if want static types, use statically typed language. if you're unable kind of business reasons, you've got bigger problem typing module won't solve.





wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -