mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2025-12-16 09:40:07 +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()
|
||||
returns = list()
|
||||
if self.type and self.type != 'void':
|
||||
returns.append(self.cleanName(self.type))
|
||||
returns.append(self.cleanType(self.type))
|
||||
|
||||
defValueMap = { 'true': 'True',
|
||||
'false': 'False',
|
||||
|
||||
@@ -380,9 +380,6 @@ class PiWrapperGenerator(generators.WrapperGeneratorBase, FixWxPrefix):
|
||||
argsString = function.pyArgsString
|
||||
if not argsString:
|
||||
argsString = '()'
|
||||
if '->' in argsString:
|
||||
pos = argsString.find(')')
|
||||
argsString = argsString[:pos+1]
|
||||
if '(' != argsString[0]:
|
||||
pos = argsString.find('(')
|
||||
argsString = argsString[pos:]
|
||||
@@ -552,9 +549,6 @@ class PiWrapperGenerator(generators.WrapperGeneratorBase, FixWxPrefix):
|
||||
argsString = method.pyArgsString
|
||||
if not argsString:
|
||||
argsString = '()'
|
||||
if '->' in argsString:
|
||||
pos = argsString.find(') ->')
|
||||
argsString = argsString[:pos+1]
|
||||
if '(' != argsString[0]:
|
||||
pos = argsString.find('(')
|
||||
argsString = argsString[pos:]
|
||||
|
||||
Reference in New Issue
Block a user