forked from mxcube/mxcubecore
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
82 lines (75 loc) · 3.16 KB
/
.pre-commit-config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
---
repos:
- repo: https://github.com/adrienverge/yamllint
rev: v1.35.1
hooks:
- id: yamllint
args:
- --strict
- repo: https://github.com/python-poetry/poetry
rev: 1.8.0
hooks:
- id: poetry-check
- repo: https://github.com/myint/autoflake
rev: v2.3.1
hooks:
- id: autoflake
name: Autoflake
args:
- --expand-star-imports
- --ignore-init-module-imports
- --in-place
- --remove-duplicate-keys
- --ignore-pass-after-docstring
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: 24.8.0 # The following version (`24.10.0`) dropped support for Python 3.8.
hooks:
- id: black
name: Black
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
# The following version (pre-commit-hooks 5.0.0) requires pre-commit 3.2.0
# which does not support Python 3.8 (dropped in pre-commit 3.0.0).
hooks:
- id: trailing-whitespace
# Exclude files from trailing-whitespace checks until we get around fixing them.
# This way we can check that other files are trailing-whitespace clean in CI.
exclude: |
(?x)^(
mxcubecore/configuration/.*|
mxcubecore/HardwareObjects/(MotorsNPosition|PlateManipulator|TangoMotor)\.py|
mxcubecore/HardwareObjects/(PlateManipulatorMaintenance|TangoLimaMpegVideo)\.py|
mxcubecore/HardwareObjects/DESY/P11(EDNACharacterisation|BackLight|Shutter|Collect|DetectorCover)\.py|
mxcubecore/HardwareObjects/LNLS/LNLS(PilatusDet|Energy|Diffractometer)\.py|
mxcubecore/HardwareObjects/LNLS/EPICS(Actuator|Motor|NState)\.py|
mxcubecore/HardwareObjects/LNLS/set_transmission_mnc.py|
mxcubecore/HardwareObjects/EMBL/EMBL(Energy|DoorInterlock|OnlineProcessing)\.py|
mxcubecore/HardwareObjects/mockup/(ISPyBClient|Motor|PlateManipulator)Mockup\.py|
mxcubecore/HardwareObjects/abstract/(AbstractXRFSpectrum|sample_changer/Crims)\.py|
mxcubecore/HardwareObjects/SOLEIL/PX2/PX2Resolution\.py|
mxcubecore/HardwareObjects/ESRF/ID29XRFSpectrum\.py
)$
- id: end-of-file-fixer
# Exclude files from end-of-file-fixer checks until we get around fixing them.
# This way we can check that other files are end-of-file-fixer clean in CI.
exclude: |
(?x)^(
mxcubecore/configuration/.*|
mxcubecore/HardwareObjects/mockup/(Shutter|Motor)Mockup\.py|
mxcubecore/HardwareObjects/LNLS/EPICS(NState|Motor)\.py|
mxcubecore/HardwareObjects/EMBL/EMBLOnlineProcessing\.py
)$
- id: check-case-conflict
- id: check-merge-conflict
# Exclude files where underlines are not distinguishable from merge conflicts.
exclude: /README\.rst$|^docs/.*\.rst$
- id: check-symlinks
- id: check-xml
- id: check-yaml
exclude: ^.drone\.yml
- id: mixed-line-ending
args: ["--fix=lf"]