You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Could the function variable types and their return types be added?
All currently supported Python versions support typing.
It would make my LSP happy.
Here's an example of a fully typed class with functions:
# Importing annotations is a good idea - `from __future__ import annotations` - also supported everywhere, and stabilized in 3.14from __future__ importannotations# `TYPE_CHECKING` ensures the code does not actually get executed during runtime outside of a type checkerfromtypingimportTYPE_CHECKINGifTYPE_CHECKING:
fromtauon.t_modules.t_mainimportGuiVar, PlayerCtl, Tauon, TDrawclassLaunch:
def__init__(self, tauon: Tauon, pctl: PlayerCtl, gui: GuiVar, ddt: TDraw) ->None:
self.tauon=tauonself.pctl=pctlself.gui=guiself.ddt=ddtdefrender(self) ->None:
pass
Could the function variable types and their return types be added?
All currently supported Python versions support typing.
It would make my LSP happy.
Here's an example of a fully typed class with functions:
py.typed
file also needs to be created in the module dir and classifier"Typing :: Typed",
should be added topyproject.toml
, see https://typing.readthedocs.io/en/latest/spec/distributing.html#packaging-typed-librariesThe text was updated successfully, but these errors were encountered: