Skip to content
This repository was archived by the owner on Dec 26, 2022. It is now read-only.

Commit 05ef0eb

Browse files
🎨 Finally fixing black & flake8 (#474)
* 🎨 Formatting with black once and for all * 🔥 Remove import sorted * 🎨 Fixing flake8 warnings * 🔧 Tweaking flake8 config * 🎨 Formatting with black once and for all (#473) (#475) * 🎨 Formatting with black once and for all * 🔥 Remove import sorted
1 parent e742400 commit 05ef0eb

File tree

17 files changed

+303
-279
lines changed

17 files changed

+303
-279
lines changed

.flake8

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[flake8]
2-
max-line-length = 88
32
ignore =
3+
E501, # line length
4+
E203 # whitespace before : in slicing.
45
D203,
56
# H101: Use TODO(NAME)
67
# H501: Do not use self.__dict__ for string formatting

docs/conf.py

Lines changed: 41 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,24 @@
1111
import os
1212
import sys
1313

14-
sys.path.append(os.path.abspath('..'))
14+
sys.path.append(os.path.abspath(".."))
1515
sys.path.append(os.path.abspath("../.."))
16-
sys.path.append(os.path.abspath('extensions'))
16+
sys.path.append(os.path.abspath("extensions"))
1717

1818
from pincer import __version__
1919

2020
# -- Project information -----------------------------------------------------
2121

2222

2323
project = "Pincer Library"
24-
copyright = '2021, Pincer'
24+
copyright = "2021, Pincer"
2525
author = "Sigmanificient, Arthurdw"
2626

2727

2828
# The full version, including alpha/beta/rc tags.
2929
release = __version__
3030

31-
branch = 'main' if __version__.endswith('a') else 'v' + __version__
31+
branch = "main" if __version__.endswith("a") else "v" + __version__
3232

3333
# -- General configuration ---------------------------------------------------
3434

@@ -37,38 +37,38 @@
3737
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
3838
# ones.
3939
extensions = [
40-
'sphinx_design',
41-
'sphinx.ext.napoleon',
42-
'sphinx.ext.autodoc',
43-
'sphinx.ext.intersphinx',
44-
'exception_hierarchy',
45-
'attributetable',
46-
'silence',
47-
'sphinxcontrib_trio',
48-
'sphinxcontrib.mermaid',
40+
"sphinx_design",
41+
"sphinx.ext.napoleon",
42+
"sphinx.ext.autodoc",
43+
"sphinx.ext.intersphinx",
44+
"exception_hierarchy",
45+
"attributetable",
46+
"silence",
47+
"sphinxcontrib_trio",
48+
"sphinxcontrib.mermaid",
4949
]
5050

5151
add_module_names = False
5252

53-
autodoc_typehints = 'none'
53+
autodoc_typehints = "none"
5454

55-
autodoc_member_order = 'alphabetical'
55+
autodoc_member_order = "alphabetical"
5656

5757
set_type_checking_flag = True
5858

59-
mermaid_output_format = 'raw'
59+
mermaid_output_format = "raw"
6060

6161
resource_links = {
62-
'discord': 'https://discord.gg/et54DgVjMX',
63-
'issues': 'https://github.com/Pincer-org/Pincer/issues',
64-
'discussions': 'https://github.com/Pincer-org/Pincer/discussions',
65-
'examples': f'https://github.com/Pincer-org/Pincer/tree/{branch}/examples',
62+
"discord": "https://discord.gg/et54DgVjMX",
63+
"issues": "https://github.com/Pincer-org/Pincer/issues",
64+
"discussions": "https://github.com/Pincer-org/Pincer/discussions",
65+
"examples": f"https://github.com/Pincer-org/Pincer/tree/{branch}/examples",
6666
}
6767

6868
intersphinx_mapping = {
69-
'py': ('https://docs.python.org/3', None),
70-
'ws': ('https://websockets.readthedocs.io/en/stable', None),
71-
'pil': ('https://pillow.readthedocs.io/en/stable', None)
69+
"py": ("https://docs.python.org/3", None),
70+
"ws": ("https://websockets.readthedocs.io/en/stable", None),
71+
"pil": ("https://pillow.readthedocs.io/en/stable", None),
7272
}
7373

7474
# Add any paths that contain templates here, relative to this directory.
@@ -77,52 +77,49 @@
7777
# List of patterns, relative to source directory, that match files and
7878
# directories to ignore when looking for source files.
7979
# This pattern also affects html_static_path and html_extra_path.
80-
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
80+
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
8181

82-
autodoc_default_options = {
83-
'members': True,
84-
'show-inheritance': True
85-
}
82+
autodoc_default_options = {"members": True, "show-inheritance": True}
8683

8784
# -- Options for HTML output -------------------------------------------------
8885

8986
# The theme to use for HTML and HTML Help pages. See the documentation for
9087
# a list of builtin themes.
9188
#
92-
html_logo = '../assets/img/icon_small.png'
93-
html_favicon = '../assets/img/icon.ico'
94-
html_theme = 'furo'
89+
html_logo = "../assets/img/icon_small.png"
90+
html_favicon = "../assets/img/icon.ico"
91+
html_theme = "furo"
9592
# Material theme options (see theme.conf for more information)
9693
html_theme_options = {
97-
'light_css_variables': {
98-
'color-brand-primary': '#4C8CBF',
99-
'color-brand-content': '#306998',
100-
'color-admonition-background': 'blue',
94+
"light_css_variables": {
95+
"color-brand-primary": "#4C8CBF",
96+
"color-brand-content": "#306998",
97+
"color-admonition-background": "blue",
10198
},
102-
'dark_css_variables': {
103-
'color-brand-primary': '#306998',
104-
'color-brand-content': '#FFE871',
105-
'color-admonition-background': 'yellow',
99+
"dark_css_variables": {
100+
"color-brand-primary": "#306998",
101+
"color-brand-content": "#FFE871",
102+
"color-admonition-background": "yellow",
106103
},
107104
"sidebar_hide_name": True,
108105
}
109-
pygments_style = 'monokai'
106+
pygments_style = "monokai"
110107
default_dark_mode = True
111108
# Add any paths that contain custom static files (such as style sheets) here,
112109
# relative to this directory. They are copied after the builtin static files,
113110
# so a file named 'default.css' will overwrite the builtin 'default.css'.
114-
html_static_path = ['_static']
111+
html_static_path = ["_static"]
115112
html_css_files = ["custom.css"]
116113

117-
rst_prolog = '''
114+
rst_prolog = """
118115
.. |coro| replace:: This function is a |coroutine_link|_.\n\n
119116
.. |maybecoro| replace:: This function *could be a* |coroutine_link|_.
120117
.. |coroutine_link| replace:: *coroutine*
121118
.. _coroutine_link: https://docs.python.org/3/library/asyncio-task.html#coroutine
122119
.. |default| raw:: html
123120
124121
<div class="default-value-section"> <span class="default-value-label">Default:</span>
125-
'''
122+
"""
126123

127124
# The suffix of source filenames.
128-
source_suffix = '.rst'
125+
source_suffix = ".rst"

0 commit comments

Comments
 (0)