Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type stub improvements #2668

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Squash - cleanup imports
lojack5 committed Jan 17, 2025
commit 24c45276c962eea4d523ab72efa38eb0f86f04f5
3 changes: 1 addition & 2 deletions etg/bmpbndl.py
Original file line number Diff line number Diff line change
@@ -10,7 +10,6 @@
import etgtools
import etgtools.tweaker_tools as tools
from etgtools import MethodDef
import etgtools.tweaker_tools

PACKAGE = "wx"
MODULE = "_core"
@@ -44,7 +43,7 @@ def run():

# Allow on-the-fly creation of a wx.BitmapBundle from a wx.Bitmap, wx.Icon
# or a wx.Image
c.convertFromPyObject = etgtools.tweaker_tools.AutoConversionInfo(
c.convertFromPyObject = tools.AutoConversionInfo(
('wx.Bitmap', 'wx.Icon', ),
"""\
// Check for type compatibility
3 changes: 1 addition & 2 deletions etg/colour.py
Original file line number Diff line number Diff line change
@@ -9,7 +9,6 @@

import etgtools
import etgtools.tweaker_tools as tools
import etgtools.tweaker_tools

PACKAGE = "wx"
MODULE = "_core"
@@ -193,7 +192,7 @@ def run():
# String with color name or #RRGGBB or #RRGGBBAA format
# None (converts to wxNullColour)
c.allowNone = True
c.convertFromPyObject = etgtools.tweaker_tools.AutoConversionInfo(
c.convertFromPyObject = tools.AutoConversionInfo(
('wx.Colour', '_ThreeInts', '_FourInts', 'str', 'None'),
"""\
// is it just a typecheck?
3 changes: 1 addition & 2 deletions etg/propgridiface.py
Original file line number Diff line number Diff line change
@@ -9,7 +9,6 @@

import etgtools
import etgtools.tweaker_tools as tools
import etgtools.tweaker_tools

PACKAGE = "wx"
MODULE = "_propgrid"
@@ -71,7 +70,7 @@ def run():

c.find('GetPtr').overloads[0].ignore()

c.convertFromPyObject = etgtools.tweaker_tools.AutoConversionInfo(
c.convertFromPyObject = tools.AutoConversionInfo(
('str', 'None', ),
"""\
// Code to test a PyObject for compatibility with wxPGPropArgCls
5 changes: 2 additions & 3 deletions etg/stream.py
Original file line number Diff line number Diff line change
@@ -9,7 +9,6 @@

import etgtools
import etgtools.tweaker_tools as tools
import etgtools.tweaker_tools

PACKAGE = "wx"
MODULE = "_core"
@@ -77,7 +76,7 @@ def run():
c.includeCppCode('src/stream_input.cpp')

# Use that class for the convert code
c.convertFromPyObject = etgtools.tweaker_tools.AutoConversionInfo(
c.convertFromPyObject = tools.AutoConversionInfo(
(), # TODO: Track down what python types actually can be wrapped
"""\
// is it just a typecheck?
@@ -239,7 +238,7 @@ def run():
c.includeCppCode('src/stream_output.cpp')

# Use that class for the convert code
c.convertFromPyObject = etgtools.tweaker_tools.AutoConversionInfo(
c.convertFromPyObject = tools.AutoConversionInfo(
(), # TODO: Track down what python types can actually be converted
"""\
// is it just a typecheck?
3 changes: 1 addition & 2 deletions etg/wxdatetime.py
Original file line number Diff line number Diff line change
@@ -9,7 +9,6 @@

import etgtools
import etgtools.tweaker_tools as tools
import etgtools.tweaker_tools

PACKAGE = "wx"
MODULE = "_core"
@@ -316,7 +315,7 @@ def fixParseMethod(m, code):

# Add some code (like MappedTypes) to automatically convert from a Python
# datetime.date or a datetime.datetime object
c.convertFromPyObject = etgtools.tweaker_tools.AutoConversionInfo(
c.convertFromPyObject = tools.AutoConversionInfo(
('datetime', 'date', ),
"""\
// Code to test a PyObject for compatibility with wxDateTime