Commit 8b5b76a
authored
Use real enum for
When I put in job state constants in #19, I didn't think to check first
whether there was a concept of real enums in Python. Turns out there is,
and we should use one instead of a whole bunch of raw constants.
This is a breaking change, but the job states have existed for so little
time that I doubt it'll break anybody, so it's worth doing it in this
instance.
And a few other small changes:
* Add typing to all exported constants.
* Fix an "invalid escape sequence" in the tag validation regex stemming
from the `\A` in it by making the string a "raw string" with `r`.JobState instead of many constant (#25)1 parent f0f7c95 commit 8b5b76a
3 files changed
+28
-25
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
10 | 14 | | |
11 | 15 | | |
12 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | 3 | | |
11 | 4 | | |
12 | 5 | | |
| 6 | + | |
13 | 7 | | |
14 | 8 | | |
15 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
38 | 43 | | |
39 | 44 | | |
40 | 45 | | |
| |||
351 | 356 | | |
352 | 357 | | |
353 | 358 | | |
354 | | - | |
| 359 | + | |
355 | 360 | | |
356 | 361 | | |
357 | 362 | | |
| |||
0 commit comments