Skip to content

Commit bf20b48

Browse files
authored
Merge pull request #236 from pyxem/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2 parents 275750c + 99673d7 commit bf20b48

7 files changed

+52
-58
lines changed

.pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
repos:
22
- repo: https://github.com/psf/black
33
# Version can be updated by running "pre-commit autoupdate"
4-
rev: 24.10.0
4+
rev: 25.1.0
55
hooks:
66
- id: black
77
ci:

diffsims/conftest.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def add_reciprocal_lattice_vector_al(doctest_namespace):
116116
doctest_namespace["rlv"] = rlv
117117

118118

119-
@pytest.fixture(params=[("file_01")])
119+
@pytest.fixture(params=["file_01"])
120120
def pickle_temp_file(tmpdir, request):
121121
name = request.param
122122
fname = tmpdir.join(name + ".pickle")

diffsims/generators/library_generator.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@
1616
# You should have received a copy of the GNU General Public License
1717
# along with diffsims. If not, see <http://www.gnu.org/licenses/>.
1818

19-
"""Diffraction pattern library generator and associated tools.
20-
"""
19+
"""Diffraction pattern library generator and associated tools."""
2120

2221
import numpy as np
2322
from tqdm import tqdm

diffsims/tests/generators/test_diffraction_generator.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
from diffsims.utils.shape_factor_models import linear, binary, sin2c, atanc, lorentzian
3030

3131

32-
@pytest.fixture(params=[(300)])
32+
@pytest.fixture(params=[300])
3333
def diffraction_calculator(request):
3434
return DiffractionGenerator(request.param)
3535

diffsims/tests/generators/test_simulation_generator.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
FILE1 = TEST_DATA_DIR / "old_simulation.npy"
4141

4242

43-
@pytest.fixture(params=[(300)])
43+
@pytest.fixture(params=[300])
4444
def diffraction_calculator(request):
4545
return SimulationGenerator(request.param)
4646

diffsims/tests/utils/test_ring_pattern_utils.py

+46-50
Original file line numberDiff line numberDiff line change
@@ -35,62 +35,58 @@ def input_parameters():
3535
@pytest.mark.parametrize(
3636
"known_values",
3737
[
38-
(
39-
np.array(
40-
[
41-
124.05909278,
42-
25.85258647,
43-
39.09906246,
44-
173.75469207,
45-
79.48046629,
46-
533.72925614,
47-
36.23521052,
48-
29.58603406,
49-
21.83270633,
50-
75.89239623,
51-
40.04732689,
52-
14.52041808,
53-
35.82637996,
54-
75.33666451,
55-
21.21751965,
56-
38.97731538,
57-
19.64631964,
58-
161.72783637,
59-
23.6894442,
60-
282.3126376,
61-
]
62-
)
38+
np.array(
39+
[
40+
124.05909278,
41+
25.85258647,
42+
39.09906246,
43+
173.75469207,
44+
79.48046629,
45+
533.72925614,
46+
36.23521052,
47+
29.58603406,
48+
21.83270633,
49+
75.89239623,
50+
40.04732689,
51+
14.52041808,
52+
35.82637996,
53+
75.33666451,
54+
21.21751965,
55+
38.97731538,
56+
19.64631964,
57+
161.72783637,
58+
23.6894442,
59+
282.3126376,
60+
]
6361
)
6462
],
6563
)
6664
@pytest.mark.parametrize(
6765
"reference_indices",
6866
[
69-
(
70-
np.array(
71-
[
72-
[205, 158],
73-
[197, 1],
74-
[105, 239],
75-
[64, 148],
76-
[61, 84],
77-
[136, 155],
78-
[37, 85],
79-
[21, 94],
80-
[247, 31],
81-
[171, 195],
82-
[202, 39],
83-
[225, 255],
84-
[233, 128],
85-
[56, 107],
86-
[22, 51],
87-
[28, 119],
88-
[20, 45],
89-
[164, 65],
90-
[235, 188],
91-
[75, 186],
92-
]
93-
)
67+
np.array(
68+
[
69+
[205, 158],
70+
[197, 1],
71+
[105, 239],
72+
[64, 148],
73+
[61, 84],
74+
[136, 155],
75+
[37, 85],
76+
[21, 94],
77+
[247, 31],
78+
[171, 195],
79+
[202, 39],
80+
[225, 255],
81+
[233, 128],
82+
[56, 107],
83+
[22, 51],
84+
[28, 119],
85+
[20, 45],
86+
[164, 65],
87+
[235, 188],
88+
[75, 186],
89+
]
9490
)
9591
],
9692
)

diffsims/utils/atomic_diffraction_generator_utils.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@
1616
# You should have received a copy of the GNU General Public License
1717
# along with diffsims. If not, see <http://www.gnu.org/licenses/>.
1818

19-
"""Back-end for computing diffraction patterns with a kinematic model.
20-
"""
19+
"""Back-end for computing diffraction patterns with a kinematic model."""
2120

2221
from numpy import array, pi, sin, cos, empty
2322
from scipy.interpolate import interpn

0 commit comments

Comments
 (0)