diff options
author | JensDiemer <git@jensdiemer.de> | 2021-05-11 16:36:56 +0200 |
---|---|---|
committer | JensDiemer <git@jensdiemer.de> | 2021-05-11 16:36:56 +0200 |
commit | 4c48b34e9332012f88ae61eb4d47f3b8ac26f523 (patch) | |
tree | 4736f50ffb25d5b55e379b07e65d129aeb71b369 /creole/shared | |
parent | f0766f1859a227134d2314491821b85f360bc202 (diff) | |
download | creole-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.py | 6 |
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): |