Skip to content

Commit a1420e4

Browse files
authored
Merge pull request #55 from cadenmyers13/pre-commit-auto
skpkg: pre-commit auto fixes
2 parents b075de8 + 2ef09a4 commit a1420e4

19 files changed

+114
-21
lines changed

.flake8

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ exclude =
77
build,
88
dist,
99
doc/source/conf.py
10-
max-line-length = 115
10+
max-line-length = 79
1111
# Ignore some style 'errors' produced while formatting by 'black'
1212
# https://black.readthedocs.io/en/stable/guides/using_black_with_other_tools.html#labels-why-pycodestyle-warnings
1313
extend-ignore = E203

.github/workflows/tests-on-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
run:
1515
shell: bash -l {0}
1616

17-
runs-on: ubuntu-latest
17+
runs-on: macos-14
1818
steps:
1919
- name: Check out diffpy.srreal
2020
uses: actions/checkout@v4

.isort.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[settings]
22
# Keep import statement below line_length character limit
3-
line_length = 115
3+
line_length = 79
44
multi_line_output = 3
55
include_trailing_comma = True

.pre-commit-config.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ repos:
1414
rev: v4.6.0
1515
hooks:
1616
- id: check-yaml
17-
exclude: ^conda-recipe/meta\.yaml$
1817
- id: end-of-file-fixer
1918
- id: trailing-whitespace
2019
- id: check-case-conflict

news/pre-commit-auto.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
**Added:**
2+
3+
* Update linelength to sk-package standard of 79 characters.
4+
5+
**Changed:**
6+
7+
* <news item>
8+
9+
**Deprecated:**
10+
11+
* <news item>
12+
13+
**Removed:**
14+
15+
* <news item>
16+
17+
**Fixed:**
18+
19+
* <news item>
20+
21+
**Security:**
22+
23+
* <news item>

src/diffpy/srreal/bondcalculator.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@
1919
__all__ = ["BondCalculator"]
2020

2121
from diffpy.srreal.srreal_ext import BondCalculator
22-
from diffpy.srreal.wraputils import propertyFromExtDoubleAttr, setattrFromKeywordArguments
22+
from diffpy.srreal.wraputils import (
23+
propertyFromExtDoubleAttr,
24+
setattrFromKeywordArguments,
25+
)
2326

2427
# property wrappers to C++ double attributes
2528

src/diffpy/srreal/bvscalculator.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@
1919
__all__ = ["BVSCalculator"]
2020

2121
from diffpy.srreal.srreal_ext import BVSCalculator
22-
from diffpy.srreal.wraputils import propertyFromExtDoubleAttr, setattrFromKeywordArguments
22+
from diffpy.srreal.wraputils import (
23+
propertyFromExtDoubleAttr,
24+
setattrFromKeywordArguments,
25+
)
2326

2427
# Property wrappers to C++ double attributes
2528

src/diffpy/srreal/overlapcalculator.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@
1919
__all__ = ["OverlapCalculator"]
2020

2121
from diffpy.srreal.srreal_ext import OverlapCalculator
22-
from diffpy.srreal.wraputils import propertyFromExtDoubleAttr, setattrFromKeywordArguments
22+
from diffpy.srreal.wraputils import (
23+
propertyFromExtDoubleAttr,
24+
setattrFromKeywordArguments,
25+
)
2326

2427
# property wrappers to C++ double attributes
2528

src/diffpy/srreal/pdfcalculator.py

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,16 @@
1818
PDFCalculator -- calculate PDF by peak summation in real space
1919
"""
2020

21-
from diffpy.srreal.srreal_ext import DebyePDFCalculator, PDFCalculator, fftftog, fftgtof
22-
from diffpy.srreal.wraputils import propertyFromExtDoubleAttr, setattrFromKeywordArguments
21+
from diffpy.srreal.srreal_ext import (
22+
DebyePDFCalculator,
23+
PDFCalculator,
24+
fftftog,
25+
fftgtof,
26+
)
27+
from diffpy.srreal.wraputils import (
28+
propertyFromExtDoubleAttr,
29+
setattrFromKeywordArguments,
30+
)
2331

2432
# exported items
2533
__all__ = """
@@ -28,7 +36,12 @@
2836
""".split()
2937

3038
# imports for backward compatibility
31-
from diffpy.srreal.pdfbaseline import LinearBaseline, PDFBaseline, ZeroBaseline, makePDFBaseline
39+
from diffpy.srreal.pdfbaseline import (
40+
LinearBaseline,
41+
PDFBaseline,
42+
ZeroBaseline,
43+
makePDFBaseline,
44+
)
3245
from diffpy.srreal.pdfenvelope import (
3346
PDFEnvelope,
3447
QResolutionEnvelope,
@@ -38,7 +51,12 @@
3851
makePDFEnvelope,
3952
)
4053
from diffpy.srreal.peakprofile import PeakProfile
41-
from diffpy.srreal.peakwidthmodel import ConstantPeakWidth, DebyeWallerPeakWidth, JeongPeakWidth, PeakWidthModel
54+
from diffpy.srreal.peakwidthmodel import (
55+
ConstantPeakWidth,
56+
DebyeWallerPeakWidth,
57+
JeongPeakWidth,
58+
PeakWidthModel,
59+
)
4260

4361
# silence the pyflakes syntax checker
4462
assert all((fftftog, fftgtof))

src/diffpy/srreal/peakprofile.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@
2323
__all__ = ["PeakProfile", "GaussianProfile", "CroppedGaussianProfile"]
2424

2525
from diffpy.srreal import _final_imports
26-
from diffpy.srreal.srreal_ext import CroppedGaussianProfile, GaussianProfile, PeakProfile
26+
from diffpy.srreal.srreal_ext import (
27+
CroppedGaussianProfile,
28+
GaussianProfile,
29+
PeakProfile,
30+
)
2731
from diffpy.srreal.wraputils import propertyFromExtDoubleAttr
2832

2933
# class PeakProfile ----------------------------------------------------------

0 commit comments

Comments
 (0)