Skip to content

Commit 628d2a8

Browse files
author
hartsantler
committed
fixed new XXX tab space before new.
1 parent db92530 commit 628d2a8

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

pythonjs/typedpython.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,11 +154,11 @@ def transform_source( source, strip=False ):
154154
output.append( indent + '@returns(%s)' %rtype)
155155
elif c.startswith('import ') and '-' in c:
156156
c = c.replace('-', '__DASH__')
157-
elif ' new ' in c:
158-
#c += ')' * c.count(' new ')
159-
#c = c.replace(' new ', ' new(')
160-
c = c.replace(' new ', ' __new__>>')
161157

158+
if ' new ' in c:
159+
c = c.replace(' new ', ' __new__>>')
160+
if '\tnew ' in c:
161+
c = c.replace('\tnew ', ' __new__>>')
162162

163163

164164
## golang

0 commit comments

Comments
 (0)