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
In looking into what it would take to complete typing for the curses module I see that the following modules do not exist and therefore have not typing info:
curses.ascii
curses.panel
curses.textpad
These all look to be fairly straightforward. But ...
Something that is confusing me is that when you create a panel: p = curses.panel.new_panel(win)
and check it's type it returns <class '_curses_panel.curses panel'>
it seems that there is a space in the class name because when I run help(p) I get:
class curses panel(builtins.object)
| Methods defined here:
|
| above(...)
|
...
In the stub, you can just define a private class like class _curses_panel, and annotate new_panel as returning _curses_panel. Names starting with _ are purely for private use in the stub, and their actual names don't matter.
In looking into what it would take to complete typing for the curses module I see that the following modules do not exist and therefore have not typing info:
curses.ascii
curses.panel
curses.textpad
These all look to be fairly straightforward. But ...
Something that is confusing me is that when you create a panel:
p = curses.panel.new_panel(win)
and check it's type it returns
<class '_curses_panel.curses panel'>
it seems that there is a space in the class name because when I run
help(p)
I get:In my digging brought me to the source code at https://github.com/python/cpython/blob/master/Modules/_curses_panel.c
starting at line 381 we have a referance to 'curses panel'
My C is only Kindergarten read only and so I have gone well beyond my depth. So how would I annotate the return type of curses.panel.new_panel?
The text was updated successfully, but these errors were encountered: