Fix a TODO

This commit is contained in:
Dave Halter
2020-07-02 01:56:19 +02:00
parent eea35ffc31
commit 9838040ca3
3 changed files with 3 additions and 5 deletions

View File

@@ -93,7 +93,7 @@ def _add_strings(context, nodes, add_slash=False):
return None
if not first and add_slash:
string += os.path.sep
string += str(s, errors='replace')
string += s
first = False
return string

View File

@@ -144,7 +144,7 @@ def get_int_or_none(value):
def get_str_or_none(value):
return _get_safe_value_or_none(value, (bytes, unicode))
return _get_safe_value_or_none(value, str)
def is_number(value):

View File

@@ -244,9 +244,7 @@ current_dirname = os.path.basename(dirname(dirname(dirname(__file__))))
('example.py', 'x = f("te" + "st"', 16, [s]),
('example.py', 'x = f("te" + "st")', 16, [s]),
('example.py', 'x = f("t" + "est")', 16, [s]),
# This is actually not correct, but for now leave it here, because of
# Python 2.
('example.py', 'x = f(b"t" + "est")', 17, [s]),
('example.py', 'x = f(b"t" + "est")', 17, []),
('example.py', '"test" + "', None, [s]),
# __file__