Skip to content

Commit 396748e

Browse files
committed
chore: update pre-commit
1 parent 2e5530d commit 396748e

26 files changed

Lines changed: 189 additions & 93 deletions

.pre-commit-config.yaml

Lines changed: 9 additions & 9 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,31 +21,31 @@ 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.5.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: 9.0.0a3
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:
@@ -58,8 +58,8 @@ repos:
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.8
6363
hooks:
6464
- id: docformatter
6565
additional_dependencies: [tomli]

devutils/sgtbx_extra_groups.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
Not to be included with code distributions.
1111
"""
1212

13-
1413
import math
1514
import re
1615

news/CI-badge-fix.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
**Added:**
22

33
* No News Added: fix CI badge and target in README.rst
4+
*No news needed: updating docformatter not user facing
45
56
**Changed:**
67

src/diffpy/structure/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
* SymmetryError
3434
"""
3535

36-
3736
import os
3837
import sys
3938

src/diffpy/structure/_legacy_importer.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
This module is deprecated and will be removed in the future.
2828
"""
2929

30-
3130
import importlib.abc
3231
import sys
3332
from warnings import warn

src/diffpy/structure/apps/vesta_viewer.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,13 @@
7272

7373

7474
def usage(style=None):
75-
"""Show usage info. for ``style=="brief"`` show only first 2 lines.
75+
"""Show usage info.
7676
77-
Parameters
78-
----------
79-
style : str, optional
80-
The usage display style.
77+
for ``style=="brief"`` show only first 2 lines.
78+
Parameters
79+
----------
80+
style : str, optional
81+
The usage display style.
8182
"""
8283
myname = Path(sys.argv[0]).name
8384
msg = __doc__.replace("vestaview", myname)

src/diffpy/structure/atom.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,13 @@ class Atom(object):
108108

109109
# instance attributes that have immutable default values
110110
element = ""
111-
"""str: Default values of `element`."""
111+
"""Str: Default values of `element`."""
112112

113113
label = ""
114-
"""str: Default values of `label`."""
114+
"""Str: Default values of `label`."""
115115

116116
occupancy = 1.0
117-
"""float: Default values of `occupancy`."""
117+
"""Float: Default values of `occupancy`."""
118118

119119
_anisotropy = False
120120
lattice = None
@@ -294,8 +294,8 @@ def xyz_cartn(self):
294294
coordinates.
295295
296296
This is computed from fractional coordinates `xyz` and the
297-
current `lattice` setup. Assignment to *xyz_cartn* or
298-
its components is applied on fractional coordinates `xyz`.
297+
current `lattice` setup. Assignment to *xyz_cartn* or its
298+
components is applied on fractional coordinates `xyz`.
299299
"""
300300
if not self.lattice:
301301
rv = self.xyz
@@ -315,7 +315,7 @@ def xyz_cartn(self, value):
315315

316316
@property
317317
def anisotropy(self):
318-
"""bool : Flag for allowing anisotropic displacement parameters.
318+
"""Bool : Flag for allowing anisotropic displacement parameters.
319319
320320
When ``False`` the tensor of thermal displacement parameters `U`
321321
must be isotropic and only its diagonal elements are taken into
@@ -439,7 +439,8 @@ def _set_uij(self, i, j, value):
439439

440440
@property
441441
def Uisoequiv(self):
442-
"""float : The isotropic displacement parameter or an equivalent value.
442+
"""Float : The isotropic displacement parameter or an equivalent
443+
value.
443444
444445
Setting a new value rescales tensor `U` so it yields equivalent
445446
direction-averaged displacements.
@@ -533,7 +534,8 @@ def Uisoequiv(self, value):
533534

534535
@property
535536
def Bisoequiv(self):
536-
"""float : The Debye-Waller isotropic displacement or an equivalent value.
537+
"""Float : The Debye-Waller isotropic displacement or an
538+
equivalent value.
537539
538540
This equals ``8 * pi**2 * Uisoequiv``. Setting a new value
539541
rescales `U` tensor to yield equivalent direction-average of
@@ -575,7 +577,7 @@ def __init__(self, atom):
575577

576578
@property
577579
def asarray(self):
578-
"""ndarray : This array viewed as standard numpy array."""
580+
"""Ndarray : This array viewed as standard numpy array."""
579581
return self.view(numpy.ndarray)
580582

581583
def __setitem__(self, idx, value):

src/diffpy/structure/expansion/shapeutils.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
)
2525
"""Utilities for making shapes."""
2626

27-
2827
@deprecated(findCenter_deprecation_msg)
2928
def findCenter(S):
3029
"""This function has been deprecated and will be removed in version

src/diffpy/structure/parsers/p_cif.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ class P_cif(StructureParser):
152152
del k
153153

154154
BtoU = 1.0 / (8 * numpy.pi**2)
155-
"""float: Conversion factor from B values to U values."""
155+
"""Float: Conversion factor from B values to U values."""
156156

157157
def _tr_ignore(a, value):
158158
return

src/diffpy/structure/parsers/p_discus.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,9 @@
3939

4040

4141
class P_discus(StructureParser):
42-
"""Parser for DISCUS structure format. The parser chokes on molecule
43-
and generator records.
42+
"""Parser for DISCUS structure format.
43+
44+
The parser chokes on molecule and generator records.
4445
4546
Attributes
4647
----------

0 commit comments

Comments
 (0)