Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_split_lines_unicode_support(self):
source = [u'copy', '\n']
self.assertEqual(split_lines(source), source)
def long_long_line_ps(source):
# A log pretty source printer for ASTOR because OSL parser does
# not accept breaking statements into different lines
from astor.source_repr import split_lines
return ''.join(split_lines(source, maxline=200))
def better_pretty_source(sauce):
# I specifically don't want to wrap lines basically ever.
# the code editor interface is ~180 cols.
t1 = astor.source_repr.split_lines(sauce, maxline=170)
t2 = astor.source_repr.flatten(t1)
ret = ''.join(t2)
return ret
def long_line_ps(source):
# A log pretty source printer for ASTOR because OSL parser does
# not accept breaking statements into different lines
from astor.source_repr import split_lines
return ''.join(split_lines(source, maxline=120))