Skip to content

Commit e182a94

Browse files
committed
applying isort and black
1 parent ec2de2c commit e182a94

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@
280280
"github_submodule/*",
281281
"LICENSE.md",
282282
"README.md",
283-
"deps/*"
283+
"deps/*",
284284
]
285285

286286
# The reST default role (used for this markup: `text`) to use for all

ext/sketchviz.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
"""A directive to generate an embedded svg image using Graphviz/Sketchviz
22
backend parsers
33
"""
4+
5+
import hashlib
46
import os
5-
from tempfile import NamedTemporaryFile
67
import subprocess
7-
import hashlib
8+
from tempfile import NamedTemporaryFile
89

9-
from docutils import nodes
1010
from ablog.commands import find_confdir, read_conf
11+
from docutils import nodes
1112
from docutils.parsers.rst import Directive
1213
from jinja2 import BaseLoader, Environment
1314
from sphinx.application import Sphinx
@@ -55,10 +56,8 @@ def run(self):
5556
temp_name = None
5657
h = hashlib.new("sha256")
5758
with NamedTemporaryFile(
58-
mode="w",
59-
encoding="utf-8",
60-
delete=False,
61-
delete_on_close=False) as fd:
59+
mode="w", encoding="utf-8", delete=False, delete_on_close=False
60+
) as fd:
6261
for content in self.content:
6362
line = f"{content}\n"
6463
h.update(line.encode())
@@ -68,8 +67,7 @@ def run(self):
6867
filename = h.digest().hex()
6968
filename = f"{filename}{FILENAME_EXT}"
7069
save_path = os.path.join(save_path, filename)
71-
subprocess.run(
72-
["sketchviz", temp_name, save_path], check=True)
70+
subprocess.run(["sketchviz", temp_name, save_path], check=True)
7371
os.remove(temp_name)
7472
logger.info("Sketchviz: Created SVG image: {save_path}")
7573

0 commit comments

Comments
 (0)