diff options
author | JensDiemer <git@jensdiemer.de> | 2020-02-07 15:06:52 +0100 |
---|---|---|
committer | JensDiemer <git@jensdiemer.de> | 2020-02-07 15:06:52 +0100 |
commit | 5a807bd897b1bdff5757deb3d41e69ec5725acc1 (patch) | |
tree | 9c1e03d6ddc0b89632cb23e1ae31c88042f8142b /creole/shared/document_tree.py | |
parent | 5da18f5cf7c5f7adbb3ff6a0015d2e7b678d3764 (diff) | |
download | creole-5a807bd897b1bdff5757deb3d41e69ec5725acc1.tar.gz |
update code style:
* remove shebangs
* remove "codeing: utf-8"
* remove "object" in class
* use more f-strings
* IOError -> OSError
* cleanup "super()" calls
Diffstat (limited to 'creole/shared/document_tree.py')
-rw-r--r-- | creole/shared/document_tree.py | 7 |
1 files changed, 3 insertions, 4 deletions
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) |