summaryrefslogtreecommitdiff
path: root/creole/shared
diff options
context:
space:
mode:
authorJensDiemer <git@jensdiemer.de>2021-05-11 16:36:56 +0200
committerJensDiemer <git@jensdiemer.de>2021-05-11 16:36:56 +0200
commit4c48b34e9332012f88ae61eb4d47f3b8ac26f523 (patch)
tree4736f50ffb25d5b55e379b07e65d129aeb71b369 /creole/shared
parentf0766f1859a227134d2314491821b85f360bc202 (diff)
downloadcreole-4c48b34e9332012f88ae61eb4d47f3b8ac26f523.tar.gz
Code cleanup: Use f-strings and generator in join() calls
Diffstat (limited to 'creole/shared')
-rw-r--r--creole/shared/markup_table.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/creole/shared/markup_table.py b/creole/shared/markup_table.py
index 444aae9..54b4763 100644
--- a/creole/shared/markup_table.py
+++ b/creole/shared/markup_table.py
@@ -60,7 +60,7 @@ class MarkupTable:
if not self.auto_width:
lines = []
for row in self.rows:
- lines.append("|" + "|".join([cell for cell in row]) + "|")
+ lines.append("|" + "|".join(cell for cell in row) + "|")
else:
# preformat every table cell
cells, widths = self._get_preformat_info()
@@ -81,8 +81,8 @@ class MarkupTable:
# preformat every table cell
cells, widths = self._get_preformat_info()
- separator_line = f"+{'+'.join([('-' * width) for width in widths])}+"
- headline_separator = f"+{'+'.join([('=' * width) for width in widths])}+"
+ separator_line = f"+{'+'.join(('-' * width) for width in widths)}+"
+ headline_separator = f"+{'+'.join(('=' * width) for width in widths)}+"
lines = []
for no, row in enumerate(cells):