mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-04 19:10:09 +01:00
Enable return-type annotations
With the work from the previous commits, it's as simple as no longer lopping off the args string at the '->' marker. (And one minor fixup to the makePyArgsString code).
This commit is contained in:
@@ -466,7 +466,7 @@ class FunctionDef(BaseDef, FixWxPrefix):
|
|||||||
params = list()
|
params = list()
|
||||||
returns = list()
|
returns = list()
|
||||||
if self.type and self.type != 'void':
|
if self.type and self.type != 'void':
|
||||||
returns.append(self.cleanName(self.type))
|
returns.append(self.cleanType(self.type))
|
||||||
|
|
||||||
defValueMap = { 'true': 'True',
|
defValueMap = { 'true': 'True',
|
||||||
'false': 'False',
|
'false': 'False',
|
||||||
|
|||||||
@@ -380,9 +380,6 @@ class PiWrapperGenerator(generators.WrapperGeneratorBase, FixWxPrefix):
|
|||||||
argsString = function.pyArgsString
|
argsString = function.pyArgsString
|
||||||
if not argsString:
|
if not argsString:
|
||||||
argsString = '()'
|
argsString = '()'
|
||||||
if '->' in argsString:
|
|
||||||
pos = argsString.find(')')
|
|
||||||
argsString = argsString[:pos+1]
|
|
||||||
if '(' != argsString[0]:
|
if '(' != argsString[0]:
|
||||||
pos = argsString.find('(')
|
pos = argsString.find('(')
|
||||||
argsString = argsString[pos:]
|
argsString = argsString[pos:]
|
||||||
@@ -552,9 +549,6 @@ class PiWrapperGenerator(generators.WrapperGeneratorBase, FixWxPrefix):
|
|||||||
argsString = method.pyArgsString
|
argsString = method.pyArgsString
|
||||||
if not argsString:
|
if not argsString:
|
||||||
argsString = '()'
|
argsString = '()'
|
||||||
if '->' in argsString:
|
|
||||||
pos = argsString.find(') ->')
|
|
||||||
argsString = argsString[:pos+1]
|
|
||||||
if '(' != argsString[0]:
|
if '(' != argsString[0]:
|
||||||
pos = argsString.find('(')
|
pos = argsString.find('(')
|
||||||
argsString = argsString[pos:]
|
argsString = argsString[pos:]
|
||||||
|
|||||||
Reference in New Issue
Block a user