forked from mxcube/mxcubecore
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
88 lines (88 loc) · 3.62 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
83
84
85
86
87
88
default_language_version:
python: python3.8
repos:
- repo: https://github.com/python-poetry/poetry
rev: 1.5.0
hooks:
- id: poetry-check
language_version: python3.8
# - id: poetry-lock
# language_version: python3.8
- repo: https://github.com/myint/autoflake
rev: v1.6.0
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/psf/black
rev: 22.8.0
hooks:
- id: black
name: Black
language_version: python3.8
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: trailing-whitespace
#
# Exclude files below from trailing-whitespace checks until we get around fixing them.
# This way we can check that all 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/Gphl/Transcal2MiniKappa\.py|
mxcubecore/HardwareObjects/SOLEIL/PX2/PX2Resolution\.py|
mxcubecore/HardwareObjects/ESRF/ID29XRFSpectrum\.py
)$
- id: end-of-file-fixer
#
# Exclude files below from end-of-file-fixer checks until we get around fixing them.
# This way we can check that all 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"]
# - repo: https://github.com/PyCQA/isort
# rev: 5.10.1
# hooks:
# - id: isort
# name: Import Sort
# args:
# - --settings=.
# exclude: (/__init__\.py$|deprecated/|mxcubecore/HardwareObjects/(ALBA|ASLS|DESY|EMBL|ESRF|LNLS|MAXIV|SOLEIL|ANSTO|Gphl|Arinax))
# - repo: https://github.com/PyCQA/flake8
# rev: 4.0.1
# hooks:
# - id: flake8
# name: Flake8
# additional_dependencies: ["flake8-bugbear==22.9.11"]
# exclude: (utils/pyispyb_client/|deprecated/|mxcubecore/HardwareObjects/(ALBA|ASLS|DESY|EMBL|ESRF|LNLS|MAXIV|SOLEIL|ANSTO|Gphl|Arinax))