]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Improve bulleting
authorAlessio Bogon <youtux@gmail.com>
Sun, 1 Sep 2019 13:02:09 +0000 (15:02 +0200)
committerAlessio Bogon <youtux@gmail.com>
Sun, 1 Sep 2019 13:02:09 +0000 (15:02 +0200)
lib/sqlalchemy/ext/linter.py

index 6a96a62f037dc2fe1cddc6110bf736c55e3a8249..3ffa83d9bbf3598dc9a86ff6b174a105f7fe5304 100644 (file)
@@ -99,10 +99,11 @@ def warn_for_unmatching_froms(query):
     if froms:
         template = '''Query\n{query}\nhas FROM elements:\n{froms}\nthat are not joined up to FROM element\n{start}'''
         indent = '    '
+        froms_str = '\n'.join('* {elem}'.format(elem=from_) for from_ in froms)
         message = template.format(
             query=_indent(str(query), indent),
-            froms=_indent('\n'.join(str(from_) for from_ in froms), indent + '* '),
-            start=_indent(str(start_with), indent + '* '),
+            froms=_indent(froms_str, indent),
+            start=_indent('* {elem}'.format(elem=start_with), indent),
         )
         util.warn(message)