Pyright and type comments?

18 views
Skip to first unread message

Marc Weber

unread,
Apr 10, 2025, 12:08:08 PMApr 10
to cython-users
I am looking at older version of cupy / cuda (cudart) It looks like it's using Cython.
However each comment seems to be formatted in chaos and a different way.
Like "NAME(a, b)" or "...\\n__init(a, b)" as type hints for class parameters or no signature only extended comments (__doc__) which can be parsed semi automatically eg "tuple of ints".

I prefer having a type checker when working with code. And I try to turn the comments into type stubs now. But it feels like proposing a common comment format which can be parsed would ease work for everybody in the long run.

So before I do anything stupid duplicating effort there already a solution ?

Marc Weber
Reply all
Reply to author
Forward
0 new messages