Skip to content

Geo5/wxPython-stubs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wxPython typing stubs package

⚠ Does not contain any tests whatsoever

Autogenerated from my wxPython fork which contains some improvements to the .pyi code generation not yet upstreamed. The fork is based on somewhere around version 4.2.3, but the type stubs are probably useful for older version as well. I am using them for working with wxPython 4.2.1 personally.

Regenerate all *.pyi files (in Phoenix git):

python build.py touch etg

Copy all *.pyi files from Phoenix git to here:

cd wx && find . -name '*.pyi' | cpio -pdmu <path-to-this-project>/src/wx-stubs/

Todos/Differences to upstream

  • 2 Phase etg execution: PR #2776
  • Should cs char and char* be Python bytes? Currently the conversion is defined as str. (See review in PR #2468)
  • {U}IntPtr Python equivalent type
  • Remove wx. from TypeAliases _TwoInt and similar in files other than core.pyi
  • Remove wx. from most/all names in core.pyi (e.g. in fonts and pen related code and wx.deprecated)
  • Remove duplicate wx.Colour in some/all/? Unions
  • Remove implementations from .pyi files
  • Does SpinCtrlDouble accept Python Decimals in SetValue(...) and similar? If yes does this conversion apply to c float64 in general and should be recorded as automatic conversion?
  • renameClass in etg scripts is not applied to type hints (they retain the old name)
  • Sip generates some c array wrapper classes (created in etg scripts), which are recorded in type hints, but don't exists as classes in .pyi files
  • Function (and @property) names shadow classes in type hints. E.g. the following is a bad type hint on f():
class Foo: ...
class Bar:
    def f(self) -> Foo: ...
    @property
    def Foo(self) -> None: ...

About

Type stubs for wxPython

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages