Skip to content

Commit 026538c

Browse files
john-halloranJohn Halloran
andauthored
skpkg: apply black to all files in the project directory (#176)
Co-authored-by: John Halloran <jhalloran@oxy.edu>
1 parent 9b0c509 commit 026538c

8 files changed

Lines changed: 264 additions & 93 deletions

File tree

doc/source/conf.py

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@
6262

6363
# General information about the project.
6464
project = "diffpy.snmf"
65-
copyright = "2023-%Y, The Trustees of Columbia University in the City of New York"
65+
copyright = (
66+
"2023-%Y, The Trustees of Columbia University in the City of New York"
67+
)
6668

6769
# The version info for the project you're documenting, acts as replacement for
6870
# |version| and |release|, also used in various other places throughout the
@@ -221,7 +223,13 @@
221223
# (source start file, target name, title,
222224
# author, documentclass [howto, manual, or own class]).
223225
latex_documents = [
224-
("index", "diffpy.snmf.tex", "diffpy.snmf Documentation", ab_authors, "manual"),
226+
(
227+
"index",
228+
"diffpy.snmf.tex",
229+
"diffpy.snmf Documentation",
230+
ab_authors,
231+
"manual",
232+
),
225233
]
226234

227235
# The name of an image file (relative to this directory) to place at the top of
@@ -249,7 +257,9 @@
249257

250258
# One entry per manual page. List of tuples
251259
# (source start file, name, description, authors, manual section).
252-
man_pages = [("index", "diffpy.snmf", "diffpy.snmf Documentation", ab_authors, 1)]
260+
man_pages = [
261+
("index", "diffpy.snmf", "diffpy.snmf Documentation", ab_authors, 1)
262+
]
253263

254264
# If true, show URL addresses after external links.
255265
# man_show_urls = False

pyproject.toml

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -60,25 +60,23 @@ ignore-words = ".codespell/ignore_words.txt"
6060
skip = "*.cif,*.dat"
6161

6262
[tool.black]
63-
line-length = 115
63+
line-length = 79
6464
include = '\.pyi?$'
6565
exclude = '''
6666
/(
6767
\.git
68-
| \.hg
69-
| \.mypy_cache
70-
| \.tox
71-
| \.venv
72-
| \.rst
73-
| \.txt
74-
| _build
75-
| buck-out
76-
| build
77-
| dist
78-
79-
# The following are specific to Black, you probably don't want those.
80-
| blib2to3
81-
| tests/data
68+
| \.hg
69+
| \.mypy_cache
70+
| \.tox
71+
| \.venv
72+
| \.rst
73+
| \.txt
74+
| _build
75+
| buck-out
76+
| build
77+
| dist
78+
| blib2to3
79+
| tests/data
8280
)/
8381
'''
8482

src/diffpy/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
"""Blank namespace package for module diffpy."""
1717

18-
1918
from pkgutil import extend_path
2019

2120
__path__ = extend_path(__path__, __name__)

src/diffpy/snmf/main.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
my_model.fit(rho=1e12, eta=610)
1919

2020
print("Done")
21-
np.savetxt("my_norm_components.txt", my_model.components_, fmt="%.6g", delimiter=" ")
21+
np.savetxt(
22+
"my_norm_components.txt", my_model.components_, fmt="%.6g", delimiter=" "
23+
)
2224
np.savetxt("my_norm_weights.txt", my_model.weights_, fmt="%.6g", delimiter=" ")
2325
np.savetxt("my_norm_stretch.txt", my_model.stretch_, fmt="%.6g", delimiter=" ")

src/diffpy/snmf/plotter.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@ class SNMFPlotter:
66
def __init__(self, figsize=(12, 4)):
77
plt.ion()
88
self.fig, self.axes = plt.subplots(1, 3, figsize=figsize)
9-
titles = ["Components", "Weights (rows as series)", "Stretch (rows as series)"]
9+
titles = [
10+
"Components",
11+
"Weights (rows as series)",
12+
"Stretch (rows as series)",
13+
]
1014
for ax, t in zip(self.axes, titles):
1115
ax.set_title(t)
1216
self.lines = {"components": [], "weights": [], "stretch": []}

0 commit comments

Comments
 (0)