style: fix lint errors + reformat source with black

This commit is contained in:
Uri Shaked
2023-09-21 22:30:52 +03:00
parent 7d48aab542
commit aa8f760375
14 changed files with 1285 additions and 954 deletions
+2 -1
View File
@@ -1,4 +1,5 @@
import os
import mistune
from mistune.renderers.markdown import MarkdownRenderer
@@ -25,7 +26,7 @@ class ImagePathRewriterRenderer(MarkdownRenderer):
def image(self, token, state):
url = token["attrs"]["url"]
if not "://" in url and not url.startswith("/"):
if "://" not in url and not url.startswith("/"):
token["attrs"]["url"] = os.path.join(self.prefix, url)
return super().image(token, state)