Skip to content

Commit d726dc0

Browse files
committed
black all the thing
1 parent 6423857 commit d726dc0

File tree

5 files changed

+236
-191
lines changed

5 files changed

+236
-191
lines changed

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949

5050
# General information about the project.
5151
project = 'sphinxcontrib-mermaid'
52-
copyright = '2017-2021, Martín Gaitán'
52+
copyright = '2017-2023, Martín Gaitán'
5353
author = 'Martín Gaitán'
5454

5555
# The version info for the project you're documenting, acts as replacement for

setup.py

Lines changed: 31 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
import io
2-
from setuptools import setup, find_packages
1+
from setuptools import find_packages, setup
32

4-
readme = open('README.rst', encoding="utf-8").read()
5-
changes = open('CHANGELOG.rst', encoding="utf-8").read()
6-
version = '0.7.1'
3+
readme = open("README.rst", encoding="utf-8").read()
4+
changes = open("CHANGELOG.rst", encoding="utf-8").read()
5+
version = "0.8"
76

87

98
def long_description():
@@ -28,37 +27,37 @@ def remove_block(text, token, margin=0):
2827

2928

3029
setup(
31-
name='sphinxcontrib-mermaid',
30+
name="sphinxcontrib-mermaid",
3231
version=version,
33-
url='https://github.com/mgaitan/sphinxcontrib-mermaid',
34-
download_url='https://pypi.python.org/pypi/sphinxcontrib-mermaid',
35-
license='BSD',
36-
author='Martín Gaitán',
37-
author_email='[email protected]',
38-
description='Mermaid diagrams in yours Sphinx powered docs',
32+
url="https://github.com/mgaitan/sphinxcontrib-mermaid",
33+
download_url="https://pypi.python.org/pypi/sphinxcontrib-mermaid",
34+
license="BSD",
35+
author="Martín Gaitán",
36+
author_email="[email protected]",
37+
description="Mermaid diagrams in yours Sphinx powered docs",
3938
long_description=long_description(),
40-
python_requires='>=3.7',
39+
python_requires=">=3.7",
4140
classifiers=[
42-
'Development Status :: 4 - Beta',
43-
'Environment :: Console',
44-
'Environment :: Web Environment',
45-
'Intended Audience :: Developers',
46-
'License :: OSI Approved :: BSD License',
47-
'Operating System :: OS Independent',
48-
'Programming Language :: Python',
49-
'Programming Language :: Python :: 3',
50-
'Programming Language :: Python :: 3.7',
51-
'Programming Language :: Python :: 3.8',
52-
'Programming Language :: Python :: 3.9',
53-
'Programming Language :: Python :: 3.10',
54-
'Programming Language :: Python :: 3.11',
55-
'Programming Language :: Python :: Implementation :: CPython',
56-
'Programming Language :: Python :: Implementation :: PyPy',
57-
'Topic :: Documentation',
58-
'Topic :: Utilities',
41+
"Development Status :: 4 - Beta",
42+
"Environment :: Console",
43+
"Environment :: Web Environment",
44+
"Intended Audience :: Developers",
45+
"License :: OSI Approved :: BSD License",
46+
"Operating System :: OS Independent",
47+
"Programming Language :: Python",
48+
"Programming Language :: Python :: 3",
49+
"Programming Language :: Python :: 3.7",
50+
"Programming Language :: Python :: 3.8",
51+
"Programming Language :: Python :: 3.9",
52+
"Programming Language :: Python :: 3.10",
53+
"Programming Language :: Python :: 3.11",
54+
"Programming Language :: Python :: Implementation :: CPython",
55+
"Programming Language :: Python :: Implementation :: PyPy",
56+
"Topic :: Documentation",
57+
"Topic :: Utilities",
5958
],
60-
platforms='any',
59+
platforms="any",
6160
packages=find_packages(),
6261
include_package_data=True,
63-
namespace_packages=['sphinxcontrib'],
62+
namespace_packages=["sphinxcontrib"],
6463
)

sphinxcontrib/autoclassdiag.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import inspect
2-
from sphinx.util import import_object, ExtensionError
2+
3+
from sphinx.util import ExtensionError, import_object
4+
35
from .exceptions import MermaidError
46

57

@@ -21,7 +23,9 @@ def get_classes(*cls_or_modules, strict=False):
2123

2224
elif inspect.ismodule(obj):
2325
for obj_ in obj.__dict__.values():
24-
if inspect.isclass(obj_) and (not strict or obj_.__module__.startswith(obj.__name__)):
26+
if inspect.isclass(obj_) and (
27+
not strict or obj_.__module__.startswith(obj.__name__)
28+
):
2529
yield obj_
2630
else:
2731
raise MermaidError(f"{cls_or_module} is not a class nor a module")
@@ -33,7 +37,7 @@ def class_diagram(*cls_or_modules, full=False, strict=False, namespace=None):
3337
def get_tree(cls):
3438
for base in cls.__bases__:
3539

36-
if base.__name__ == 'object':
40+
if base.__name__ == "object":
3741
continue
3842
if namespace and not base.__module__.startswith(namespace):
3943
continue
@@ -45,14 +49,12 @@ def get_tree(cls):
4549
get_tree(cls)
4650

4751
return "classDiagram\n" + "\n".join(
48-
f" {a} <|-- {b}"
49-
for a, b in sorted(inheritances)
50-
)
52+
f" {a} <|-- {b}" for a, b in sorted(inheritances)
53+
)
5154

5255

5356
if __name__ == "__main__":
5457

55-
5658
class A:
5759
pass
5860

@@ -72,5 +74,3 @@ class E(C1):
7274
pass
7375

7476
print(class_diagram("__main__.D", "__main__.E", full=True))
75-
76-

sphinxcontrib/exceptions.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from sphinx.errors import SphinxError
22

3+
34
class MermaidError(SphinxError):
4-
category = 'Mermaid error'
5+
category = "Mermaid error"

0 commit comments

Comments
 (0)