Skip to content

Commit 63aa9e9

Browse files
committed
run pre-commit autoupdate and run pre-commit
1 parent 653c98d commit 63aa9e9

11 files changed

Lines changed: 19 additions & 31 deletions

File tree

.pre-commit-config.yaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ci:
1111
submodules: false
1212
repos:
1313
- repo: https://github.com/pre-commit/pre-commit-hooks
14-
rev: v4.6.0
14+
rev: v6.0.0
1515
hooks:
1616
- id: check-yaml
1717
- id: end-of-file-fixer
@@ -21,45 +21,45 @@ repos:
2121
- id: check-toml
2222
- id: check-added-large-files
2323
- repo: https://github.com/psf/black
24-
rev: 24.4.2
24+
rev: 26.3.1
2525
hooks:
2626
- id: black
2727
- repo: https://github.com/pycqa/flake8
28-
rev: 7.0.0
28+
rev: 7.3.0
2929
hooks:
3030
- id: flake8
3131
- repo: https://github.com/pycqa/isort
32-
rev: 5.13.2
32+
rev: 8.0.1
3333
hooks:
3434
- id: isort
3535
args: ["--profile", "black"]
3636
- repo: https://github.com/kynan/nbstripout
37-
rev: 0.7.1
37+
rev: 0.9.1
3838
hooks:
3939
- id: nbstripout
4040
- repo: https://github.com/pre-commit/pre-commit-hooks
41-
rev: v4.4.0
41+
rev: v6.0.0
4242
hooks:
4343
- id: no-commit-to-branch
4444
name: Prevent Commit to Main Branch
4545
args: ["--branch", "main"]
4646
stages: [pre-commit]
4747
- repo: https://github.com/codespell-project/codespell
48-
rev: v2.3.0
48+
rev: v2.4.2
4949
hooks:
5050
- id: codespell
5151
additional_dependencies:
5252
- tomli
5353
# prettier - multi formatter for .json, .yml, and .md files
5454
- repo: https://github.com/pre-commit/mirrors-prettier
55-
rev: f12edd9c7be1c20cfa42420fd0e6df71e42b51ea # frozen: v4.0.0-alpha.8
55+
rev: v4.0.0-alpha.8
5656
hooks:
5757
- id: prettier
5858
additional_dependencies:
5959
- "prettier@^3.2.4"
6060
# docformatter - PEP 257 compliant docstring formatter
61-
- repo: https://github.com/s-weigand/docformatter
62-
rev: 5757c5190d95e5449f102ace83df92e7d3b06c6c
61+
- repo: https://github.com/PyCQA/docformatter
62+
rev: v1.7.7
6363
hooks:
6464
- id: docformatter
6565
additional_dependencies: [tomli]

src/diffpy/srfit/equation/builder.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@
7575
> beq = c*f(a,b)
7676
> eq = beq.makeEquation()
7777
"""
78+
7879
import inspect
7980
import numbers
8081
import token

src/diffpy/srfit/fitbase/profileparser.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
See the class documentation for more information.
2323
"""
2424

25-
2625
from pathlib import Path
2726

2827
import numpy as np

src/diffpy/srfit/interface/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
for scripting.
2020
"""
2121

22-
2322
from diffpy.srfit.interface.interface import (
2423
FitRecipeInterface,
2524
ParameterInterface,

src/diffpy/srfit/structure/sgconstraints.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
##############################################################################
1515
"""Code to set space group constraints for a crystal structure."""
1616

17-
1817
import re
1918

2019
import numpy

src/diffpy/srfit/util/weakrefcallable.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
##############################################################################
1515
"""Picklable storage of callable objects using weak references."""
1616

17-
1817
import types
1918
import weakref
2019

@@ -125,7 +124,7 @@ def __getstate__(self):
125124
def __setstate__(self, state):
126125
"""Restore the weak reference in this wrapper upon
127126
unpickling."""
128-
(self._class, nm, self.fallback, mobj) = state
127+
self._class, nm, self.fallback, mobj = state
129128
self.function = getattr(self._class, nm)
130129
if mobj is None:
131130
# use a fake weak reference that mimics deallocated object.

tests/conftest.py

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -242,8 +242,7 @@ def temp_data_files(tmp_path):
242242
cgr_file.write_text("1.0 2.0\n" "1.1 2.1\n" "1.2 2.2\n")
243243

244244
results_file = tmp_path / "fit_results.res"
245-
results_file.write_text(
246-
"""
245+
results_file.write_text("""
247246
Results written: Wed Feb 25 15:14:58 2026
248247
produced by cadenmyers
249248
@@ -266,8 +265,7 @@ def temp_data_files(tmp_path):
266265
Variable Correlations greater than 25% (Correlations invalid)
267266
------------------------------------------------------------------------------
268267
No correlations greater than 25%
269-
"""
270-
)
268+
""")
271269
yield tmp_path
272270

273271

@@ -314,17 +312,15 @@ def parser_datafiles(tmp_path):
314312

315313
# Three-column (x, y, dy)
316314
(tmp_path / "three_col.dat").write_text(
317-
METADATA_HEADER
318-
+ r"""#L r($\AA$) G($\AA^{-2}$) dG($\AA^{-2}$)
315+
METADATA_HEADER + r"""#L r($\AA$) G($\AA^{-2}$) dG($\AA^{-2}$)
319316
1.0 2.0 0.2
320317
1.1 2.1 0.4
321318
1.2 2.2 0.6"""
322319
)
323320

324321
# Two-column (x, y)
325322
(tmp_path / "two_col.txt").write_text(
326-
METADATA_HEADER
327-
+ r"""#L r($\AA$) G($\AA^{-2}$)
323+
METADATA_HEADER + r"""#L r($\AA$) G($\AA^{-2}$)
328324
1.0 2.0
329325
1.1 2.1
330326
1.2 2.2"""
@@ -349,13 +345,10 @@ def parser_datafiles(tmp_path):
349345
)
350346

351347
# One-column
352-
(tmp_path / "one_col.gr").write_text(
353-
METADATA_HEADER
354-
+ r"""#L r($\AA$)
348+
(tmp_path / "one_col.gr").write_text(METADATA_HEADER + r"""#L r($\AA$)
355349
1.0
356350
1.1
357-
1.2"""
358-
)
351+
1.2""")
359352

360353
# Five-column (extra column)
361354
(tmp_path / "five_col.gr").write_text(

tests/debug.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
Exceptions raised by failed tests or other errors are not caught.
2020
"""
2121

22-
2322
if __name__ == "__main__":
2423
import sys
2524

tests/run.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
python -m diffpy.srfit.tests.run
1818
"""
1919

20-
2120
if __name__ == "__main__":
2221
import sys
2322

tests/test_contribution.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#
1414
##############################################################################
1515
"""Tests for refinableobj module."""
16+
1617
import unittest
1718

1819
import numpy as np

0 commit comments

Comments
 (0)