forked from PlasmaPy/PlasmaPy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-search-and-replace.yaml
67 lines (50 loc) · 2.03 KB
/
.pre-commit-search-and-replace.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
# Include regular expressions between slashes. The "|" means "or".
# If there are special characters in one of the fields, put it in single
# quotes.
- search: /Plasmapy|PlasmaPY/PlasmPy|Plasmpy|Palsmapy|PlasmaPY/
replacement: PlasmaPy
description: Fix common misspellings and use consistent capitalization for PlasmaPy
- search: /plasmpy|plaspmy|plasapy|palsmapy/
replacement: plasmapy
description: Fix common misspellings of plasmapy
- search: from astropy import units as u
replacement: import astropy.units as u
- search: from astropy import constants as const
replacement: import astropy.constants as const
- search: '|array-like|'
replacement: '|array_like|'
description: NumPy uses an underscore in 'array_like'
- search: ':term:`particle-like`'
replacement: '|particle-like|'
description: Apply reStructuredText substitution
- search: ':term:`array_like`'
replacement: '|array_like|'
description: Apply reStructuredText substitution
- search: 'optional, |keyword-only|'
replacement: '|keyword-only|, optional'
description: Keep a consistent order in type specifications
- search: ', optional, default:'
replacement: ', default:'
description: No need to specify that a parameter is optional if there is a default value
- search: 'the the '
replacement: 'the '
description: Fix common grammar error
- search: 'MacOS'
replacement: 'macOS'
- search: 'particle="e"'
replacement: 'particle="e-"'
description: Use canonical symbol for electron
- search: 'particle="p"'
replacement: 'particle="p+"'
description: Use canonical symbol for proton
- search: 'ion="p"'
replacement: 'ion="p+"'
description: Use canonical symbol for proton
- search: '|nox|'
replacement: '|Nox|'
description: Nox is capitalized except when used as a command
- search: 'nox -e'
replacement: 'nox -s'
description: The -s refers to Nox sessions, while the -e is from tox environments
- search: '``~plasmapy'
description: Either enclose the namespace with single backticks to make it a link, or remove the tilde and keep it a literal