Skip to content

Commit 144994c

Browse files
committed
chore: update pre-commit
1 parent fc7bcfb commit 144994c

58 files changed

Lines changed: 53 additions & 138 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.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]

docs/examples/coreshellnp.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737

3838
def makeRecipe(stru1, stru2, datname):
3939
"""Create a fitting recipe for crystalline PDF data."""
40-
4140
# The Profile
4241
profile = Profile()
4342

@@ -133,7 +132,6 @@ def makeRecipe(stru1, stru2, datname):
133132

134133
def plotResults(recipe):
135134
"""Plot the results contained within a refined FitRecipe."""
136-
137135
# All this should be pretty familiar by now.
138136
r = recipe.cdszns.profile.x
139137
g = recipe.cdszns.profile.y
@@ -157,7 +155,6 @@ def plotResults(recipe):
157155

158156
def main():
159157
"""Set up and refine the recipe."""
160-
161158
# Make the data and the recipe
162159
cdsciffile = "data/CdS.cif"
163160
znsciffile = "data/ZnS.cif"

docs/examples/crystalpdf.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242

4343
def makeRecipe(ciffile, datname):
4444
"""Create a fitting recipe for crystalline PDF data."""
45-
4645
# The Profile
4746
# This will be used to store the observed and calculated PDF profile.
4847
profile = Profile()
@@ -131,7 +130,6 @@ def makeRecipe(ciffile, datname):
131130

132131
def plotResults(recipe):
133132
"""Plot the results contained within a refined FitRecipe."""
134-
135133
# All this should be pretty familiar by now.
136134
r = recipe.nickel.profile.x
137135
g = recipe.nickel.profile.y

docs/examples/crystalpdfall.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ def makeRecipe(
5656
ciffile_ni, ciffile_si, xdata_ni, ndata_ni, xdata_si, xdata_sini
5757
):
5858
"""Create a fitting recipe for crystalline PDF data."""
59-
6059
# The Profiles
6160
# We need a profile for each data set.
6261
xprofile_ni = makeProfile(xdata_ni)
@@ -146,7 +145,6 @@ def makeRecipe(
146145

147146
def plotResults(recipe):
148147
"""Plot the results contained within a refined FitRecipe."""
149-
150148
# All this should be pretty familiar by now.
151149
xnickel = recipe.xnickel
152150
xr_ni = xnickel.profile.x

docs/examples/crystalpdfobjcryst.py

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

3838
def makeRecipe(ciffile, datname):
3939
"""Create a fitting recipe for crystalline PDF data."""
40-
4140
# The Profile
4241
# This will be used to store the observed and calculated PDF profile.
4342
profile = Profile()

docs/examples/crystalpdftwodata.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838

3939
def makeRecipe(ciffile, xdatname, ndatname):
4040
"""Create a fitting recipe for crystalline PDF data."""
41-
4241
# The Profiles
4342
# We need a profile for each data set. This means that we will need two
4443
# FitContributions as well.
@@ -137,7 +136,6 @@ def makeRecipe(ciffile, xdatname, ndatname):
137136

138137
def plotResults(recipe):
139138
"""Plot the results contained within a refined FitRecipe."""
140-
141139
# All this should be pretty familiar by now.
142140
xr = recipe.xnickel.profile.x
143141
xg = recipe.xnickel.profile.y

docs/examples/crystalpdftwophase.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838

3939
def makeRecipe(niciffile, siciffile, datname):
4040
"""Create a fitting recipe for crystalline PDF data."""
41-
4241
# The Profile
4342
profile = Profile()
4443

@@ -142,7 +141,6 @@ def makeRecipe(niciffile, siciffile, datname):
142141

143142
def plotResults(recipe):
144143
"""Plot the results contained within a refined FitRecipe."""
145-
146144
# All this should be pretty familiar by now.
147145
r = recipe.nisi.profile.x
148146
g = recipe.nisi.profile.y

docs/examples/debyemodel.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ def makeRecipe():
8484
optimize for the data/equation pair. This can be modified, but we
8585
won't do that here.
8686
"""
87-
8887
# The Profile
8988
# Create a Profile to hold the experimental and calculated signal.
9089
profile = Profile()
@@ -159,7 +158,6 @@ def makeRecipe():
159158

160159
def plotResults(recipe):
161160
"""Plot the results contained within a refined FitRecipe."""
162-
163161
# Plot this.
164162
# Note that since the contribution was given the name "pb", it is
165163
# accessible from the recipe with this name. This is a useful way to
@@ -182,7 +180,6 @@ def plotResults(recipe):
182180

183181
def main():
184182
"""The workflow of creating, running and inspecting a fit."""
185-
186183
# Create the recipe
187184
recipe = makeRecipe()
188185

docs/examples/debyemodelII.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ def makeRecipeII():
5454
constrain the Debye temperature in each FitContribution to be the
5555
same.
5656
"""
57-
5857
# We'll throw these away. We just want the FitContributions that are
5958
# configured within the recipes.
6059
m1 = makeRecipe()
@@ -95,7 +94,6 @@ def makeRecipeII():
9594

9695
def plotResults(recipe):
9796
"""Display the results contained within a refined FitRecipe."""
98-
9997
# The variable values are returned in the order in which the variables were
10098
# added to the FitRecipe.
10199
lowToffset, highToffset, thetaD = recipe.getValues()

docs/examples/ellipsoidsas.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030

3131
def makeRecipe(datname):
3232
"""Create a fitting recipe for ellipsoidal SAS data."""
33-
3433
# The Profile
3534
# This will be used to store the observed and calculated I(Q) data.
3635
profile = Profile()
@@ -89,7 +88,6 @@ def makeRecipe(datname):
8988

9089
def plotResults(recipe):
9190
"""Plot the results contained within a refined FitRecipe."""
92-
9391
# All this should be pretty familiar by now.
9492
r = recipe.ellipsoid.profile.x
9593
y = recipe.ellipsoid.profile.y

0 commit comments

Comments
 (0)