Skip to content

Commit 5c7fc21

Browse files
committed
chore: Run black + isort with string normalization (one time diff)
1 parent c7002de commit 5c7fc21

17 files changed

+653
-653
lines changed

docs/conf.py

+73-73
Original file line numberDiff line numberDiff line change
@@ -22,108 +22,108 @@
2222

2323

2424
extensions = [
25-
'sphinx.ext.autodoc',
26-
'sphinx.ext.intersphinx',
27-
'sphinx_autodoc_typehints',
28-
'sphinx.ext.todo',
29-
'sphinx.ext.linkcode',
30-
'sphinx.ext.napoleon',
31-
'alagitpull',
32-
'sphinx_issues',
33-
'myst_parser',
25+
"sphinx.ext.autodoc",
26+
"sphinx.ext.intersphinx",
27+
"sphinx_autodoc_typehints",
28+
"sphinx.ext.todo",
29+
"sphinx.ext.linkcode",
30+
"sphinx.ext.napoleon",
31+
"alagitpull",
32+
"sphinx_issues",
33+
"myst_parser",
3434
]
3535

3636
myst_enable_extensions = ["colon_fence"]
3737

38-
issues_github_path = about['__github__'].replace('https://github.com/', '')
38+
issues_github_path = about["__github__"].replace("https://github.com/", "")
3939

40-
templates_path = ['_templates']
40+
templates_path = ["_templates"]
4141

42-
source_suffix = {'.rst': 'restructuredtext', '.md': 'markdown'}
42+
source_suffix = {".rst": "restructuredtext", ".md": "markdown"}
4343

44-
master_doc = 'index'
44+
master_doc = "index"
4545

46-
project = about['__title__']
47-
copyright = about['__copyright__']
46+
project = about["__title__"]
47+
copyright = about["__copyright__"]
4848

49-
version = '%s' % ('.'.join(about['__version__'].split('.'))[:2])
50-
release = '%s' % (about['__version__'])
49+
version = "%s" % (".".join(about["__version__"].split("."))[:2])
50+
release = "%s" % (about["__version__"])
5151

52-
exclude_patterns = ['_build']
52+
exclude_patterns = ["_build"]
5353

54-
pygments_style = 'sphinx'
54+
pygments_style = "sphinx"
5555

5656
html_theme_path = [alagitpull.get_path()]
57-
html_favicon = '_static/favicon.ico'
58-
html_theme = 'alagitpull'
57+
html_favicon = "_static/favicon.ico"
58+
html_theme = "alagitpull"
5959
html_theme_options = {
60-
'logo': 'img/libtmux.svg',
61-
'github_user': 'tmux-python',
62-
'github_repo': 'libtmux',
63-
'github_type': 'star',
64-
'github_banner': True,
65-
'projects': alagitpull.projects,
66-
'project_name': about['__title__'],
67-
'project_title': about['__title__'],
68-
'project_description': about['__description__'],
69-
'project_url': about['__docs__'],
70-
'show_meta_manifest_tag': True,
71-
'show_meta_og_tags': True,
72-
'show_meta_app_icon_tags': True,
60+
"logo": "img/libtmux.svg",
61+
"github_user": "tmux-python",
62+
"github_repo": "libtmux",
63+
"github_type": "star",
64+
"github_banner": True,
65+
"projects": alagitpull.projects,
66+
"project_name": about["__title__"],
67+
"project_title": about["__title__"],
68+
"project_description": about["__description__"],
69+
"project_url": about["__docs__"],
70+
"show_meta_manifest_tag": True,
71+
"show_meta_og_tags": True,
72+
"show_meta_app_icon_tags": True,
7373
}
74-
alagitpull_internal_hosts = ['libtmux.git-pull.com', '0.0.0.0']
74+
alagitpull_internal_hosts = ["libtmux.git-pull.com", "0.0.0.0"]
7575
alagitpull_external_hosts_new_window = True
7676

7777
html_sidebars = {
78-
'**': [
79-
'about.html',
80-
'navigation.html',
81-
'relations.html',
82-
'more.html',
83-
'book.html',
84-
'searchbox.html',
78+
"**": [
79+
"about.html",
80+
"navigation.html",
81+
"relations.html",
82+
"more.html",
83+
"book.html",
84+
"searchbox.html",
8585
]
8686
}
8787

88-
html_theme_path = ['_themes']
89-
html_static_path = ['_static']
90-
html_extra_path = ['manifest.json']
88+
html_theme_path = ["_themes"]
89+
html_static_path = ["_static"]
90+
html_extra_path = ["manifest.json"]
9191

92-
htmlhelp_basename = '%sdoc' % about['__title__']
92+
htmlhelp_basename = "%sdoc" % about["__title__"]
9393

9494
latex_documents = [
9595
(
96-
'index',
97-
'{}.tex'.format(about['__package_name__']),
98-
'{} Documentation'.format(about['__title__']),
99-
about['__author__'],
100-
'manual',
96+
"index",
97+
"{}.tex".format(about["__package_name__"]),
98+
"{} Documentation".format(about["__title__"]),
99+
about["__author__"],
100+
"manual",
101101
)
102102
]
103103

104104
man_pages = [
105105
(
106-
'index',
107-
about['__package_name__'],
108-
'{} Documentation'.format(about['__title__']),
109-
about['__author__'],
106+
"index",
107+
about["__package_name__"],
108+
"{} Documentation".format(about["__title__"]),
109+
about["__author__"],
110110
1,
111111
)
112112
]
113113

114114
texinfo_documents = [
115115
(
116-
'index',
117-
'{}'.format(about['__package_name__']),
118-
'{} Documentation'.format(about['__title__']),
119-
about['__author__'],
120-
about['__package_name__'],
121-
about['__description__'],
122-
'Miscellaneous',
116+
"index",
117+
"{}".format(about["__package_name__"]),
118+
"{} Documentation".format(about["__title__"]),
119+
about["__author__"],
120+
about["__package_name__"],
121+
about["__description__"],
122+
"Miscellaneous",
123123
)
124124
]
125125

126-
intersphinx_mapping = {'http://docs.python.org/': None}
126+
intersphinx_mapping = {"http://docs.python.org/": None}
127127

128128

129129
def linkcode_resolve(domain, info): # NOQA: C901
@@ -135,18 +135,18 @@ def linkcode_resolve(domain, info): # NOQA: C901
135135
From https://github.com/numpy/numpy/blob/v1.15.1/doc/source/conf.py, 7c49cfa
136136
on Jul 31. License BSD-3. https://github.com/numpy/numpy/blob/v1.15.1/LICENSE.txt
137137
"""
138-
if domain != 'py':
138+
if domain != "py":
139139
return None
140140

141-
modname = info['module']
142-
fullname = info['fullname']
141+
modname = info["module"]
142+
fullname = info["fullname"]
143143

144144
submod = sys.modules.get(modname)
145145
if submod is None:
146146
return None
147147

148148
obj = submod
149-
for part in fullname.split('.'):
149+
for part in fullname.split("."):
150150
try:
151151
obj = getattr(obj, part)
152152
except Exception:
@@ -180,18 +180,18 @@ def linkcode_resolve(domain, info): # NOQA: C901
180180

181181
fn = relpath(fn, start=dirname(libtmux.__file__))
182182

183-
if 'dev' in about['__version__']:
183+
if "dev" in about["__version__"]:
184184
return "%s/blob/master/%s/%s%s" % (
185-
about['__github__'],
186-
about['__package_name__'],
185+
about["__github__"],
186+
about["__package_name__"],
187187
fn,
188188
linespec,
189189
)
190190
else:
191191
return "%s/blob/v%s/%s/%s%s" % (
192-
about['__github__'],
193-
about['__version__'],
194-
about['__package_name__'],
192+
about["__github__"],
193+
about["__version__"],
194+
about["__package_name__"],
195195
fn,
196196
linespec,
197197
)

libtmux/__about__.py

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
__title__ = 'libtmux'
2-
__package_name__ = 'libtmux'
3-
__version__ = '0.11.0b0'
4-
__description__ = 'scripting library / orm for tmux'
5-
__email__ = '[email protected]'
6-
__author__ = 'Tony Narlock'
7-
__github__ = 'https://github.com/tmux-python/libtmux'
8-
__docs__ = 'https://libtmux.git-pull.com'
9-
__tracker__ = 'https://github.com/tmux-python/libtmux/issues'
10-
__pypi__ = 'https://pypi.org/project/libtmux/'
11-
__license__ = 'MIT'
12-
__copyright__ = 'Copyright 2016- Tony Narlock'
1+
__title__ = "libtmux"
2+
__package_name__ = "libtmux"
3+
__version__ = "0.11.0b0"
4+
__description__ = "scripting library / orm for tmux"
5+
__email__ = "[email protected]"
6+
__author__ = "Tony Narlock"
7+
__github__ = "https://github.com/tmux-python/libtmux"
8+
__docs__ = "https://libtmux.git-pull.com"
9+
__tracker__ = "https://github.com/tmux-python/libtmux/issues"
10+
__pypi__ = "https://pypi.org/project/libtmux/"
11+
__license__ = "MIT"
12+
__copyright__ = "Copyright 2016- Tony Narlock"

libtmux/_compat.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
def console_to_str(s):
1010
"""From pypa/pip project, pip.backwardwardcompat. License MIT."""
1111
try:
12-
return s.decode(console_encoding, 'ignore')
12+
return s.decode(console_encoding, "ignore")
1313
except UnicodeDecodeError:
14-
return s.decode('utf_8', 'ignore')
14+
return s.decode("utf_8", "ignore")
1515

1616

1717
def reraise(tp, value, tb=None):
@@ -24,4 +24,4 @@ def str_from_console(s):
2424
try:
2525
return str(s)
2626
except UnicodeDecodeError:
27-
return str(s, encoding='utf_8')
27+
return str(s, encoding="utf_8")

0 commit comments

Comments
 (0)