Skip to content

Commit f3f8ae3

Browse files
committed
Run precommit
1 parent 90dd060 commit f3f8ae3

File tree

9 files changed

+50
-8
lines changed

9 files changed

+50
-8
lines changed

.coveragerc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[run]
2-
source =
2+
source =
33
diffpy/snmf/
44
[report]
55
omit =

.flake8

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ exclude =
88
max-line-length = 115
99
# Ignore some style 'errors' produced while formatting by 'black'
1010
# https://black.readthedocs.io/en/stable/guides/using_black_with_other_tools.html#labels-why-pycodestyle-warnings
11-
extend-ignore = E203
11+
extend-ignore = E203

.pre-commit-config.yaml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
default_language_version:
2+
python: python3
3+
ci:
4+
autofix_commit_msg: |
5+
[pre-commit.ci] auto fixes from pre-commit hooks
6+
autofix_prs: true
7+
autoupdate_branch: 'pre-commit-autoupdate'
8+
autoupdate_commit_msg: '[pre-commit.ci] pre-commit autoupdate'
9+
autoupdate_schedule: monthly
10+
skip: [no-commit-to-branch]
11+
submodules: false
12+
repos:
13+
- repo: https://github.com/pre-commit/pre-commit-hooks
14+
rev: v4.6.0
15+
hooks:
16+
- id: check-yaml
17+
- id: end-of-file-fixer
18+
- id: trailing-whitespace
19+
exclude: '\.(rst|txt)$'
20+
- repo: https://github.com/psf/black
21+
rev: 24.4.2
22+
hooks:
23+
- id: black
24+
- repo: https://github.com/pycqa/flake8
25+
rev: 7.0.0
26+
hooks:
27+
- id: flake8
28+
- repo: https://github.com/pycqa/isort
29+
rev: 5.13.2
30+
hooks:
31+
- id: isort
32+
args: ["--profile", "black"]
33+
- repo: https://github.com/kynan/nbstripout
34+
rev: 0.7.1
35+
hooks:
36+
- id: nbstripout
37+
- repo: https://github.com/pre-commit/pre-commit-hooks
38+
rev: v4.4.0
39+
hooks:
40+
- id: no-commit-to-branch
41+
name: Prevent Commit to Main Branch
42+
args: ["--branch", "main"]
43+
stages: [pre-commit]

CHANGELOG.rst

-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,3 @@
33
===========
44

55
.. current developments
6-

doc/source/conf.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@
66

77
# -- Path setup --------------------------------------------------------------
88

9+
import os
10+
911
# If extensions (or modules to document with autodoc) are in another directory,
1012
# add these directories to sys.path here. If the directory is relative to the
1113
# documentation root, use os.path.abspath to make it absolute, like shown here.
1214
#
1315
import sys
14-
import os
1516

1617
sys.path.insert(0, os.path.abspath("../.."))
1718

@@ -48,7 +49,7 @@
4849
# Add any paths that contain templates here, relative to this directory.
4950
templates_path = ["_templates"]
5051

51-
from jinja2 import Template, Environment, FileSystemLoader
52+
from jinja2 import Environment, FileSystemLoader, Template
5253

5354
source_suffix = ".rst"
5455

doc/source/release.rst

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
.. index:: release notes
22

33
.. include:: /../../CHANGELOG.rst
4-

requirements/docs.txt

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
make
22
sphinx_rtd_theme
33
m2r
4-

run_tests.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/env python
22

33
import sys
4+
45
import pytest
56

67
if __name__ == "__main__":

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
"""
99

1010
import os
11-
from setuptools import setup, find_packages
1211

12+
from setuptools import find_packages, setup
1313

1414
MYDIR = os.path.dirname(os.path.abspath(__file__))
1515

0 commit comments

Comments
 (0)