Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 42c3b47

Browse files
committed
Added warnings for unhandled string formatting translations
1 parent 3be8010 commit 42c3b47

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

java2python/mod/transform.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
# understand how and when selectors are associated with these callables.
1313

1414
import re
15+
from logging import warn
1516

1617
import keyword
1718
import types
@@ -132,10 +133,12 @@ def formatString(node, config):
132133
format = call_args[0].firstChild()
133134
if format.type == tokens.IDENT:
134135
# String variable
135-
pass
136+
warn('Formatting string %s is not automatically translated.'
137+
% str(format.token.text))
136138
else:
137139
# Function that returns String
138-
pass
140+
warn('Formatting string returned by %s() is not automatically translated.'
141+
% str(format.firstChildOfType(tokens.IDENT).token.text))
139142

140143
left_ident = dot.children[0]
141144
right_ident = dot.children[1]

0 commit comments

Comments
 (0)