Skip to content

Commit 2b3d492

Browse files
committed
chore: Run black + isort with string normalization (one time diff)
1 parent 0d2d439 commit 2b3d492

13 files changed

+377
-377
lines changed

docs/conf.py

+73-73
Original file line numberDiff line numberDiff line change
@@ -12,115 +12,115 @@
1212
exec(fp.read(), about)
1313

1414
extensions = [
15-
'sphinx.ext.autodoc',
16-
'sphinx.ext.intersphinx',
17-
'sphinx_autodoc_typehints',
18-
'sphinx.ext.todo',
19-
'sphinx.ext.napoleon',
20-
'sphinx.ext.linkcode',
21-
'alagitpull',
22-
'sphinx_issues',
23-
'sphinx_click.ext', # sphinx-click
24-
'myst_parser',
15+
"sphinx.ext.autodoc",
16+
"sphinx.ext.intersphinx",
17+
"sphinx_autodoc_typehints",
18+
"sphinx.ext.todo",
19+
"sphinx.ext.napoleon",
20+
"sphinx.ext.linkcode",
21+
"alagitpull",
22+
"sphinx_issues",
23+
"sphinx_click.ext", # sphinx-click
24+
"myst_parser",
2525
]
2626

2727
# app setup hook
2828
def setup(app):
2929
pass
3030

3131

32-
myst_enable_extensions = ['substitution', 'replacements']
32+
myst_enable_extensions = ["substitution", "replacements"]
3333

3434

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

37-
templates_path = ['_templates']
37+
templates_path = ["_templates"]
3838

39-
source_suffix = {'.rst': 'restructuredtext', '.md': 'markdown'}
39+
source_suffix = {".rst": "restructuredtext", ".md": "markdown"}
4040

41-
master_doc = 'index'
41+
master_doc = "index"
4242

43-
project = about['__title__']
44-
copyright = about['__copyright__']
43+
project = about["__title__"]
44+
copyright = about["__copyright__"]
4545

46-
version = '%s' % ('.'.join(about['__version__'].split('.'))[:2])
47-
release = '%s' % (about['__version__'])
46+
version = "%s" % (".".join(about["__version__"].split("."))[:2])
47+
release = "%s" % (about["__version__"])
4848

49-
exclude_patterns = ['_build']
49+
exclude_patterns = ["_build"]
5050

51-
pygments_style = 'sphinx'
51+
pygments_style = "sphinx"
5252

5353
html_theme_path = [alagitpull.get_path()]
54-
html_theme = 'alagitpull'
54+
html_theme = "alagitpull"
5555
html_theme_options = {
56-
'logo': 'img/vcspull.svg',
57-
'github_user': 'vcs-python',
58-
'github_repo': 'vcspull',
59-
'github_type': 'star',
60-
'github_banner': True,
61-
'projects': alagitpull.projects,
62-
'project_name': about['__title__'],
63-
'project_title': about['__title__'],
64-
'project_description': about['__description__'],
65-
'project_url': about['__docs__'],
66-
'show_meta_manifest_tag': True,
67-
'show_meta_og_tags': True,
68-
'show_meta_app_icon_tags': True,
56+
"logo": "img/vcspull.svg",
57+
"github_user": "vcs-python",
58+
"github_repo": "vcspull",
59+
"github_type": "star",
60+
"github_banner": True,
61+
"projects": alagitpull.projects,
62+
"project_name": about["__title__"],
63+
"project_title": about["__title__"],
64+
"project_description": about["__description__"],
65+
"project_url": about["__docs__"],
66+
"show_meta_manifest_tag": True,
67+
"show_meta_og_tags": True,
68+
"show_meta_app_icon_tags": True,
6969
}
7070
html_sidebars = {
71-
'**': [
72-
'about.html',
73-
'navigation.html',
74-
'relations.html',
75-
'more.html',
76-
'searchbox.html',
71+
"**": [
72+
"about.html",
73+
"navigation.html",
74+
"relations.html",
75+
"more.html",
76+
"searchbox.html",
7777
]
7878
}
7979

80-
html_static_path = ['_static']
81-
html_extra_path = ['manifest.json']
80+
html_static_path = ["_static"]
81+
html_extra_path = ["manifest.json"]
8282

83-
alagitpull_internal_hosts = ['vcspull.git-pull.com', '0.0.0.0']
83+
alagitpull_internal_hosts = ["vcspull.git-pull.com", "0.0.0.0"]
8484
alagitpull_external_hosts_new_window = True
8585

8686

87-
htmlhelp_basename = '%sdoc' % about['__title__']
87+
htmlhelp_basename = "%sdoc" % about["__title__"]
8888

8989
latex_documents = [
9090
(
91-
'index',
92-
'{0}.tex'.format(about['__package_name__']),
93-
'{0} Documentation'.format(about['__title__']),
94-
about['__author__'],
95-
'manual',
91+
"index",
92+
"{0}.tex".format(about["__package_name__"]),
93+
"{0} Documentation".format(about["__title__"]),
94+
about["__author__"],
95+
"manual",
9696
)
9797
]
9898

9999
man_pages = [
100100
(
101-
'index',
102-
about['__package_name__'],
103-
'{0} Documentation'.format(about['__title__']),
104-
about['__author__'],
101+
"index",
102+
about["__package_name__"],
103+
"{0} Documentation".format(about["__title__"]),
104+
about["__author__"],
105105
1,
106106
)
107107
]
108108

109109
texinfo_documents = [
110110
(
111-
'index',
112-
'{0}'.format(about['__package_name__']),
113-
'{0} Documentation'.format(about['__title__']),
114-
about['__author__'],
115-
about['__package_name__'],
116-
about['__description__'],
117-
'Miscellaneous',
111+
"index",
112+
"{0}".format(about["__package_name__"]),
113+
"{0} Documentation".format(about["__title__"]),
114+
about["__author__"],
115+
about["__package_name__"],
116+
about["__description__"],
117+
"Miscellaneous",
118118
)
119119
]
120120

121121
intersphinx_mapping = {
122-
'py': ('https://docs.python.org/', None),
123-
'libvcs': ('http://libvcs.git-pull.com/', None),
122+
"py": ("https://docs.python.org/", None),
123+
"libvcs": ("http://libvcs.git-pull.com/", None),
124124
}
125125

126126

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

145-
modname = info['module']
146-
fullname = info['fullname']
145+
modname = info["module"]
146+
fullname = info["fullname"]
147147

148148
submod = sys.modules.get(modname)
149149
if submod is None:
150150
return None
151151

152152
obj = submod
153-
for part in fullname.split('.'):
153+
for part in fullname.split("."):
154154
try:
155155
obj = getattr(obj, part)
156156
except Exception:
@@ -184,18 +184,18 @@ def linkcode_resolve(domain, info): # NOQA: C901
184184

185185
fn = relpath(fn, start=dirname(vcspull.__file__))
186186

187-
if 'dev' in about['__version__']:
187+
if "dev" in about["__version__"]:
188188
return "%s/blob/master/%s/%s%s" % (
189-
about['__github__'],
190-
about['__package_name__'],
189+
about["__github__"],
190+
about["__package_name__"],
191191
fn,
192192
linespec,
193193
)
194194
else:
195195
return "%s/blob/v%s/%s/%s%s" % (
196-
about['__github__'],
197-
about['__version__'],
198-
about['__package_name__'],
196+
about["__github__"],
197+
about["__version__"],
198+
about["__package_name__"],
199199
fn,
200200
linespec,
201201
)

tests/conftest.py

+11-11
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66

77
@pytest.fixture
8-
def tmpdir_repoparent(tmpdir_factory, scope='function'):
8+
def tmpdir_repoparent(tmpdir_factory, scope="function"):
99
"""Return temporary directory for repository checkout guaranteed unique."""
1010
fn = tmpdir_factory.mktemp("repo")
1111
return fn
@@ -14,11 +14,11 @@ def tmpdir_repoparent(tmpdir_factory, scope='function'):
1414
@pytest.fixture
1515
def git_repo_kwargs(tmpdir_repoparent, git_dummy_repo_dir):
1616
"""Return kwargs for :func:`create_repo_from_pip_url`."""
17-
repo_name = 'repo_clone'
17+
repo_name = "repo_clone"
1818
return {
19-
'url': 'git+file://' + git_dummy_repo_dir,
20-
'parent_dir': str(tmpdir_repoparent),
21-
'name': repo_name,
19+
"url": "git+file://" + git_dummy_repo_dir,
20+
"parent_dir": str(tmpdir_repoparent),
21+
"name": repo_name,
2222
}
2323

2424

@@ -32,14 +32,14 @@ def git_repo(git_repo_kwargs):
3232

3333
@pytest.fixture
3434
def create_git_dummy_repo(tmpdir_repoparent):
35-
def fn(repo_name, testfile_filename='testfile.test'):
35+
def fn(repo_name, testfile_filename="testfile.test"):
3636
repo_path = str(tmpdir_repoparent.join(repo_name))
3737

38-
run(['git', 'init', repo_name], cwd=str(tmpdir_repoparent))
38+
run(["git", "init", repo_name], cwd=str(tmpdir_repoparent))
3939

40-
run(['touch', testfile_filename], cwd=repo_path)
41-
run(['git', 'add', testfile_filename], cwd=repo_path)
42-
run(['git', 'commit', '-m', 'test file for %s' % repo_name], cwd=repo_path)
40+
run(["touch", testfile_filename], cwd=repo_path)
41+
run(["git", "add", testfile_filename], cwd=repo_path)
42+
run(["git", "commit", "-m", "test file for %s" % repo_name], cwd=repo_path)
4343

4444
return repo_path
4545

@@ -49,4 +49,4 @@ def fn(repo_name, testfile_filename='testfile.test'):
4949
@pytest.fixture
5050
def git_dummy_repo_dir(tmpdir_repoparent, create_git_dummy_repo):
5151
"""Create a git repo with 1 commit, used as a remote."""
52-
return create_git_dummy_repo('dummyrepo')
52+
return create_git_dummy_repo("dummyrepo")

0 commit comments

Comments
 (0)