diff options
Diffstat (limited to 'creole/shared')
-rw-r--r-- | creole/shared/base_emitter.py | 5 | ||||
-rw-r--r-- | creole/shared/document_tree.py | 7 | ||||
-rw-r--r-- | creole/shared/example_macros.py | 3 | ||||
-rw-r--r-- | creole/shared/markup_table.py | 3 | ||||
-rw-r--r-- | creole/shared/unknown_tags.py | 2 | ||||
-rw-r--r-- | creole/shared/utils.py | 3 |
6 files changed, 6 insertions, 17 deletions
diff --git a/creole/shared/base_emitter.py b/creole/shared/base_emitter.py index d0c98f1..a6e2819 100644 --- a/creole/shared/base_emitter.py +++ b/creole/shared/base_emitter.py @@ -1,4 +1,3 @@ - """ Base document tree emitter ~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -15,7 +14,7 @@ from creole.shared.markup_table import MarkupTable from creole.shared.unknown_tags import transparent_unknown_nodes -class BaseEmitter(object): +class BaseEmitter: """ Build from a document_tree (html2creole.parser.HtmlParser instance) a creole markup text. @@ -236,4 +235,4 @@ class BaseEmitter(object): def debug_msg(self, method, txt): if not self.debugging: return - print("%13s: %s" % (method, txt)) + print(f"{method:>13}: {txt}") diff --git a/creole/shared/document_tree.py b/creole/shared/document_tree.py index 20c6a44..fdcc863 100644 --- a/creole/shared/document_tree.py +++ b/creole/shared/document_tree.py @@ -1,5 +1,4 @@ -#!/usr/bin/env python -# coding: utf-8 + """ python-creole @@ -83,13 +82,13 @@ class DocNode: continue if callable(getattr(self, i)): continue - print("%20s: %r" % (i, getattr(self, i, "---"))) + print(f"{i:>20}: {getattr(self, i, '---')!r}") class DebugList(list): def __init__(self, html2creole): self.html2creole = html2creole - super(DebugList, self).__init__() + super().__init__() def append(self, item): # for stack_frame in inspect.stack(): print(stack_frame) diff --git a/creole/shared/example_macros.py b/creole/shared/example_macros.py index 88a9bc8..78f317c 100644 --- a/creole/shared/example_macros.py +++ b/creole/shared/example_macros.py @@ -1,6 +1,3 @@ -# coding: utf-8 - - """ Creole macros ~~~~~~~~~~~~~ diff --git a/creole/shared/markup_table.py b/creole/shared/markup_table.py index acb9b21..dd26374 100644 --- a/creole/shared/markup_table.py +++ b/creole/shared/markup_table.py @@ -1,5 +1,4 @@ - -class MarkupTable(object): +class MarkupTable: """ Container for holding table data and render the data in creole markup. Format every cell width to the same col width. diff --git a/creole/shared/unknown_tags.py b/creole/shared/unknown_tags.py index 26cfd3a..8d36ad0 100644 --- a/creole/shared/unknown_tags.py +++ b/creole/shared/unknown_tags.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python -# coding: utf-8 """ diff --git a/creole/shared/utils.py b/creole/shared/utils.py index 1d0071f..9c8ffc8 100644 --- a/creole/shared/utils.py +++ b/creole/shared/utils.py @@ -1,6 +1,3 @@ -# coding: utf-8 - - """ python creole utilities ~~~~~~~~~~~~~~~~~~~~~~~ |