Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6dabc43b6a | ||
|
|
8f92555ad5 | ||
|
|
afc4963401 |
No files matched your search
@@ -116,3 +116,5 @@ package-lock.json
|
|||||||
public/
|
public/
|
||||||
|
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
|
||||||
|
.doit.db
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
|
|
||||||
WINS_OVER = {
|
WINS_OVER = {
|
||||||
"A": "C",
|
"A": "C",
|
||||||
"B": "A",
|
"B": "A",
|
||||||
|
|||||||
+1
-2
@@ -1,7 +1,6 @@
|
|||||||
|
from collections.abc import Iterable
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Generator, TypeVar
|
from typing import Generator, TypeVar
|
||||||
from collections.abc import Iterable
|
|
||||||
|
|
||||||
|
|
||||||
T = TypeVar("T")
|
T = TypeVar("T")
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
from typing import ContextManager, Optional
|
|
||||||
from solution import part1, part2, priority, chunks
|
|
||||||
|
|
||||||
from contextlib import nullcontext as no_raise
|
from contextlib import nullcontext as no_raise
|
||||||
|
from typing import ContextManager, Optional
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
|
from solution import chunks, part1, part2, priority
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def example_data() -> str:
|
def example_data() -> str:
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
# Day 4: Camp Cleanup
|
||||||
|
|
||||||
|
## Part 1
|
||||||
|
|
||||||
|
Space needs to be cleared before the last supplies can be unloaded from the ships, and so several Elves have been assigned the job of cleaning up sections of the camp. Every section has a unique ID number, and each Elf is assigned a range of section IDs.
|
||||||
|
|
||||||
|
However, as some of the Elves compare their section assignments with each other, they've noticed that many of the assignments overlap. To try to quickly find overlaps and reduce duplicated effort, the Elves pair up and make a big list of the section assignments for each pair (your puzzle input).
|
||||||
|
|
||||||
|
For example, consider the following list of section assignment pairs:
|
||||||
|
|
||||||
|
```
|
||||||
|
2-4,6-8
|
||||||
|
2-3,4-5
|
||||||
|
5-7,7-9
|
||||||
|
2-8,3-7
|
||||||
|
6-6,4-6
|
||||||
|
2-6,4-8
|
||||||
|
```
|
||||||
|
|
||||||
|
For the first few pairs, this list means:
|
||||||
|
|
||||||
|
Within the first pair of Elves, the first Elf was assigned sections 2-4 (sections 2, 3, and 4), while the second Elf was assigned sections 6-8 (sections 6, 7, 8).
|
||||||
|
The Elves in the second pair were each assigned two sections.
|
||||||
|
The Elves in the third pair were each assigned three sections: one got sections 5, 6, and 7, while the other also got 7, plus 8 and 9.
|
||||||
|
|
||||||
|
This example list uses single-digit section IDs to make it easier to draw; your actual list might contain larger numbers. Visually, these pairs of section assignments look like this:
|
||||||
|
|
||||||
|
```
|
||||||
|
.234..... 2-4
|
||||||
|
.....678. 6-8
|
||||||
|
|
||||||
|
.23...... 2-3
|
||||||
|
...45.... 4-5
|
||||||
|
|
||||||
|
....567.. 5-7
|
||||||
|
......789 7-9
|
||||||
|
|
||||||
|
.2345678. 2-8
|
||||||
|
..34567.. 3-7
|
||||||
|
|
||||||
|
.....6... 6-6
|
||||||
|
...456... 4-6
|
||||||
|
|
||||||
|
.23456... 2-6
|
||||||
|
...45678. 4-8
|
||||||
|
```
|
||||||
|
|
||||||
|
Some of the pairs have noticed that one of their assignments fully contains the other. For example, 2-8 fully contains 3-7, and 6-6 is fully contained by 4-6. In pairs where one assignment fully contains the other, one Elf in the pair would be exclusively cleaning sections their partner will already be cleaning, so these seem like the most in need of reconsideration. In this example, there are 2 such pairs.
|
||||||
|
|
||||||
|
In how many assignment pairs does one range fully contain the other?
|
||||||
|
|
||||||
|
## Part 2
|
||||||
|
|
||||||
|
It seems like there is still quite a bit of duplicate work planned. Instead, the Elves would like to know the number of pairs that overlap at all.
|
||||||
|
|
||||||
|
In the above example, the first two pairs (2-4,6-8 and 2-3,4-5) don't overlap, while the remaining four pairs (5-7,7-9, 2-8,3-7, 6-6,4-6, and 2-6,4-8) do overlap:
|
||||||
|
|
||||||
|
5-7,7-9 overlaps in a single section, 7.
|
||||||
|
2-8,3-7 overlaps all of the sections 3 through 7.
|
||||||
|
6-6,4-6 overlaps in a single section, 6.
|
||||||
|
2-6,4-8 overlaps in sections 4, 5, and 6.
|
||||||
|
|
||||||
|
So, in this example, the number of overlapping assignment pairs is 4.
|
||||||
@@ -0,0 +1,1000 @@
|
|||||||
|
82-82,8-83
|
||||||
|
6-98,6-93
|
||||||
|
56-77,55-82
|
||||||
|
51-68,51-61
|
||||||
|
4-90,3-67
|
||||||
|
29-30,29-97
|
||||||
|
42-88,13-87
|
||||||
|
17-95,33-96
|
||||||
|
11-56,12-56
|
||||||
|
16-90,89-94
|
||||||
|
74-79,78-80
|
||||||
|
20-82,19-87
|
||||||
|
4-86,5-85
|
||||||
|
37-54,37-55
|
||||||
|
15-92,16-91
|
||||||
|
48-93,3-92
|
||||||
|
23-47,7-47
|
||||||
|
75-77,2-76
|
||||||
|
35-88,35-87
|
||||||
|
56-64,65-89
|
||||||
|
17-80,18-79
|
||||||
|
28-87,27-88
|
||||||
|
6-62,61-63
|
||||||
|
25-85,24-25
|
||||||
|
10-72,12-72
|
||||||
|
54-71,44-70
|
||||||
|
20-96,97-99
|
||||||
|
19-46,14-47
|
||||||
|
7-97,3-6
|
||||||
|
14-78,5-7
|
||||||
|
98-98,40-98
|
||||||
|
1-92,1-83
|
||||||
|
14-52,13-68
|
||||||
|
40-43,40-82
|
||||||
|
13-96,95-98
|
||||||
|
16-18,17-82
|
||||||
|
69-79,3-70
|
||||||
|
24-58,23-25
|
||||||
|
96-96,2-96
|
||||||
|
5-99,4-97
|
||||||
|
7-11,12-95
|
||||||
|
26-28,1-27
|
||||||
|
4-35,2-7
|
||||||
|
22-94,21-95
|
||||||
|
15-18,18-83
|
||||||
|
66-68,65-66
|
||||||
|
31-36,36-71
|
||||||
|
26-37,26-31
|
||||||
|
55-55,9-56
|
||||||
|
21-22,21-29
|
||||||
|
9-98,8-96
|
||||||
|
7-39,2-38
|
||||||
|
84-84,55-83
|
||||||
|
18-41,18-41
|
||||||
|
18-84,18-87
|
||||||
|
3-73,4-74
|
||||||
|
16-61,16-91
|
||||||
|
44-83,43-45
|
||||||
|
7-39,38-68
|
||||||
|
29-46,13-30
|
||||||
|
43-77,20-78
|
||||||
|
50-85,61-84
|
||||||
|
49-74,90-92
|
||||||
|
59-81,81-81
|
||||||
|
41-81,81-94
|
||||||
|
17-80,7-79
|
||||||
|
43-96,90-95
|
||||||
|
96-99,1-97
|
||||||
|
7-89,6-8
|
||||||
|
73-75,73-76
|
||||||
|
15-55,14-15
|
||||||
|
56-88,88-98
|
||||||
|
7-10,9-94
|
||||||
|
55-57,57-61
|
||||||
|
16-85,17-52
|
||||||
|
41-54,41-53
|
||||||
|
30-96,30-30
|
||||||
|
70-87,84-88
|
||||||
|
83-93,96-99
|
||||||
|
13-31,13-70
|
||||||
|
7-26,26-95
|
||||||
|
34-51,33-75
|
||||||
|
51-94,13-99
|
||||||
|
11-95,1-95
|
||||||
|
6-95,5-7
|
||||||
|
71-78,21-79
|
||||||
|
9-80,9-97
|
||||||
|
32-49,31-50
|
||||||
|
79-79,1-80
|
||||||
|
76-87,75-92
|
||||||
|
2-97,3-96
|
||||||
|
1-16,16-69
|
||||||
|
1-97,99-99
|
||||||
|
29-36,28-36
|
||||||
|
6-9,4-9
|
||||||
|
55-61,20-56
|
||||||
|
16-78,15-81
|
||||||
|
52-53,52-82
|
||||||
|
13-71,9-72
|
||||||
|
65-96,96-97
|
||||||
|
56-68,55-56
|
||||||
|
94-99,3-93
|
||||||
|
96-98,13-49
|
||||||
|
12-89,88-89
|
||||||
|
14-93,93-93
|
||||||
|
4-99,1-4
|
||||||
|
48-67,44-48
|
||||||
|
13-50,47-51
|
||||||
|
3-4,3-90
|
||||||
|
74-80,76-81
|
||||||
|
49-70,18-50
|
||||||
|
6-36,6-39
|
||||||
|
59-87,58-88
|
||||||
|
31-78,32-79
|
||||||
|
90-90,80-91
|
||||||
|
94-95,56-94
|
||||||
|
5-5,6-83
|
||||||
|
37-50,46-47
|
||||||
|
79-81,80-83
|
||||||
|
4-93,7-94
|
||||||
|
90-91,9-90
|
||||||
|
75-87,44-87
|
||||||
|
41-93,40-40
|
||||||
|
3-13,12-51
|
||||||
|
13-92,5-14
|
||||||
|
36-80,36-52
|
||||||
|
13-95,13-14
|
||||||
|
83-88,22-83
|
||||||
|
3-68,2-84
|
||||||
|
47-63,47-64
|
||||||
|
77-91,39-92
|
||||||
|
17-99,17-17
|
||||||
|
3-72,3-4
|
||||||
|
2-90,3-90
|
||||||
|
3-90,90-93
|
||||||
|
50-86,50-87
|
||||||
|
28-63,28-32
|
||||||
|
44-94,43-45
|
||||||
|
39-48,48-53
|
||||||
|
7-44,7-60
|
||||||
|
3-87,86-88
|
||||||
|
39-99,40-98
|
||||||
|
15-17,16-18
|
||||||
|
27-94,26-26
|
||||||
|
35-81,34-36
|
||||||
|
40-67,39-77
|
||||||
|
9-35,4-9
|
||||||
|
33-83,34-47
|
||||||
|
1-99,10-99
|
||||||
|
79-85,49-79
|
||||||
|
10-12,11-21
|
||||||
|
19-83,19-26
|
||||||
|
27-84,25-28
|
||||||
|
4-84,5-85
|
||||||
|
11-62,61-94
|
||||||
|
1-94,93-95
|
||||||
|
22-28,99-99
|
||||||
|
50-81,81-81
|
||||||
|
23-82,22-24
|
||||||
|
18-73,17-72
|
||||||
|
74-98,34-74
|
||||||
|
8-10,9-21
|
||||||
|
27-43,43-44
|
||||||
|
10-78,9-82
|
||||||
|
94-96,27-93
|
||||||
|
73-73,39-73
|
||||||
|
17-45,17-98
|
||||||
|
19-34,18-34
|
||||||
|
2-82,16-24
|
||||||
|
63-63,5-63
|
||||||
|
34-94,34-96
|
||||||
|
99-99,12-99
|
||||||
|
8-24,9-97
|
||||||
|
4-61,3-62
|
||||||
|
1-99,99-99
|
||||||
|
2-77,1-78
|
||||||
|
52-81,31-51
|
||||||
|
7-71,33-72
|
||||||
|
2-63,15-95
|
||||||
|
17-86,15-17
|
||||||
|
54-71,72-72
|
||||||
|
4-8,9-73
|
||||||
|
45-76,45-65
|
||||||
|
32-50,15-33
|
||||||
|
14-96,15-99
|
||||||
|
66-88,42-89
|
||||||
|
13-26,25-49
|
||||||
|
20-96,95-97
|
||||||
|
39-63,44-64
|
||||||
|
47-70,70-70
|
||||||
|
89-89,14-89
|
||||||
|
5-94,4-95
|
||||||
|
9-31,8-80
|
||||||
|
5-5,4-99
|
||||||
|
77-79,8-76
|
||||||
|
3-93,2-94
|
||||||
|
97-98,14-83
|
||||||
|
10-97,7-10
|
||||||
|
28-53,14-53
|
||||||
|
9-61,8-67
|
||||||
|
7-25,24-43
|
||||||
|
37-39,37-38
|
||||||
|
73-74,73-95
|
||||||
|
60-60,52-61
|
||||||
|
33-46,32-45
|
||||||
|
2-76,2-75
|
||||||
|
88-88,5-58
|
||||||
|
58-82,57-59
|
||||||
|
43-58,57-59
|
||||||
|
25-89,24-89
|
||||||
|
1-99,2-98
|
||||||
|
35-37,3-35
|
||||||
|
14-96,32-96
|
||||||
|
65-84,64-65
|
||||||
|
86-86,86-92
|
||||||
|
14-96,95-95
|
||||||
|
99-99,68-98
|
||||||
|
67-89,68-88
|
||||||
|
94-95,47-94
|
||||||
|
7-94,95-95
|
||||||
|
11-84,17-85
|
||||||
|
14-41,10-41
|
||||||
|
12-14,13-90
|
||||||
|
13-79,79-79
|
||||||
|
8-94,94-95
|
||||||
|
13-14,13-73
|
||||||
|
6-85,7-64
|
||||||
|
2-98,98-99
|
||||||
|
6-99,7-98
|
||||||
|
5-88,4-96
|
||||||
|
4-98,36-99
|
||||||
|
4-5,5-90
|
||||||
|
33-95,53-95
|
||||||
|
13-89,88-90
|
||||||
|
80-82,3-81
|
||||||
|
63-98,63-64
|
||||||
|
1-98,32-97
|
||||||
|
64-88,12-87
|
||||||
|
1-32,6-33
|
||||||
|
61-79,61-80
|
||||||
|
2-16,1-95
|
||||||
|
77-80,3-64
|
||||||
|
6-36,7-35
|
||||||
|
12-28,12-13
|
||||||
|
54-88,53-54
|
||||||
|
22-32,21-80
|
||||||
|
97-99,10-98
|
||||||
|
30-98,30-97
|
||||||
|
17-21,18-20
|
||||||
|
44-63,23-43
|
||||||
|
19-90,18-19
|
||||||
|
7-73,7-91
|
||||||
|
25-49,48-48
|
||||||
|
30-43,31-42
|
||||||
|
13-52,14-51
|
||||||
|
50-55,45-54
|
||||||
|
27-36,27-35
|
||||||
|
17-17,16-26
|
||||||
|
11-94,10-63
|
||||||
|
17-46,47-51
|
||||||
|
49-83,49-52
|
||||||
|
18-64,18-22
|
||||||
|
4-96,4-93
|
||||||
|
16-17,16-54
|
||||||
|
52-52,22-38
|
||||||
|
2-4,5-97
|
||||||
|
8-19,18-87
|
||||||
|
62-99,62-86
|
||||||
|
92-96,41-73
|
||||||
|
5-80,6-79
|
||||||
|
81-82,12-81
|
||||||
|
10-10,11-70
|
||||||
|
71-72,7-70
|
||||||
|
49-83,37-50
|
||||||
|
14-48,48-76
|
||||||
|
8-98,5-7
|
||||||
|
21-85,22-86
|
||||||
|
59-99,58-98
|
||||||
|
8-98,4-98
|
||||||
|
30-52,10-85
|
||||||
|
12-87,13-88
|
||||||
|
28-65,28-79
|
||||||
|
25-70,29-97
|
||||||
|
60-60,6-60
|
||||||
|
11-13,10-12
|
||||||
|
18-50,18-80
|
||||||
|
65-65,52-66
|
||||||
|
1-94,1-80
|
||||||
|
33-99,99-99
|
||||||
|
29-81,19-82
|
||||||
|
37-97,11-37
|
||||||
|
60-60,6-59
|
||||||
|
3-62,3-63
|
||||||
|
27-96,26-98
|
||||||
|
2-82,1-83
|
||||||
|
9-17,27-56
|
||||||
|
8-65,8-9
|
||||||
|
72-73,37-72
|
||||||
|
1-8,2-98
|
||||||
|
5-98,4-98
|
||||||
|
21-98,22-98
|
||||||
|
11-95,10-95
|
||||||
|
52-98,3-97
|
||||||
|
1-91,3-92
|
||||||
|
7-34,7-42
|
||||||
|
23-58,22-58
|
||||||
|
3-84,2-83
|
||||||
|
40-46,46-83
|
||||||
|
42-54,43-71
|
||||||
|
86-88,11-87
|
||||||
|
26-82,26-27
|
||||||
|
52-68,33-53
|
||||||
|
24-79,24-64
|
||||||
|
5-40,5-39
|
||||||
|
10-89,1-4
|
||||||
|
5-7,7-10
|
||||||
|
41-79,41-80
|
||||||
|
12-66,13-67
|
||||||
|
82-86,75-83
|
||||||
|
14-63,63-87
|
||||||
|
20-64,15-21
|
||||||
|
2-14,1-91
|
||||||
|
15-48,8-49
|
||||||
|
25-92,8-26
|
||||||
|
12-99,99-99
|
||||||
|
8-89,7-80
|
||||||
|
1-3,4-26
|
||||||
|
15-70,15-24
|
||||||
|
85-85,35-63
|
||||||
|
85-86,86-86
|
||||||
|
3-93,4-92
|
||||||
|
35-43,43-43
|
||||||
|
44-72,66-67
|
||||||
|
65-66,66-67
|
||||||
|
1-96,80-97
|
||||||
|
27-57,57-57
|
||||||
|
26-87,86-97
|
||||||
|
3-97,98-98
|
||||||
|
98-99,18-77
|
||||||
|
24-86,97-98
|
||||||
|
8-39,39-73
|
||||||
|
15-74,12-55
|
||||||
|
17-19,18-94
|
||||||
|
18-94,94-94
|
||||||
|
4-34,7-35
|
||||||
|
3-64,2-2
|
||||||
|
19-73,18-74
|
||||||
|
83-94,82-84
|
||||||
|
3-94,2-95
|
||||||
|
35-96,14-99
|
||||||
|
24-25,23-27
|
||||||
|
81-93,24-81
|
||||||
|
3-89,39-89
|
||||||
|
94-95,68-94
|
||||||
|
98-98,82-99
|
||||||
|
9-90,4-89
|
||||||
|
8-77,7-9
|
||||||
|
22-39,23-39
|
||||||
|
75-85,11-76
|
||||||
|
70-80,79-81
|
||||||
|
72-74,71-73
|
||||||
|
11-95,11-97
|
||||||
|
4-95,94-95
|
||||||
|
11-91,12-38
|
||||||
|
9-31,32-57
|
||||||
|
83-90,58-88
|
||||||
|
11-78,12-78
|
||||||
|
55-80,64-79
|
||||||
|
41-48,39-41
|
||||||
|
87-89,1-88
|
||||||
|
14-34,35-71
|
||||||
|
46-48,47-66
|
||||||
|
12-37,12-12
|
||||||
|
61-75,75-75
|
||||||
|
8-47,9-93
|
||||||
|
37-37,35-37
|
||||||
|
4-4,1-4
|
||||||
|
36-93,35-99
|
||||||
|
7-90,8-89
|
||||||
|
60-82,60-83
|
||||||
|
69-74,30-73
|
||||||
|
37-95,12-94
|
||||||
|
8-65,74-95
|
||||||
|
63-66,59-67
|
||||||
|
16-38,19-35
|
||||||
|
21-27,26-80
|
||||||
|
19-71,11-70
|
||||||
|
97-97,15-98
|
||||||
|
45-49,44-48
|
||||||
|
2-2,2-83
|
||||||
|
54-80,23-81
|
||||||
|
75-97,74-98
|
||||||
|
72-83,1-10
|
||||||
|
3-83,4-4
|
||||||
|
11-93,92-97
|
||||||
|
4-95,6-94
|
||||||
|
62-72,61-63
|
||||||
|
29-45,10-30
|
||||||
|
35-35,36-83
|
||||||
|
3-66,3-64
|
||||||
|
58-73,36-72
|
||||||
|
14-36,16-36
|
||||||
|
26-86,25-27
|
||||||
|
28-56,57-73
|
||||||
|
4-94,3-93
|
||||||
|
82-87,19-73
|
||||||
|
29-60,14-61
|
||||||
|
14-35,14-15
|
||||||
|
9-93,10-94
|
||||||
|
11-13,20-30
|
||||||
|
2-79,1-92
|
||||||
|
10-42,84-99
|
||||||
|
47-47,47-62
|
||||||
|
1-94,1-98
|
||||||
|
35-42,43-89
|
||||||
|
98-98,43-99
|
||||||
|
40-98,40-97
|
||||||
|
90-93,74-89
|
||||||
|
28-55,55-56
|
||||||
|
1-7,6-75
|
||||||
|
2-94,94-94
|
||||||
|
71-91,71-92
|
||||||
|
21-98,99-99
|
||||||
|
70-94,5-40
|
||||||
|
13-94,30-95
|
||||||
|
25-93,25-89
|
||||||
|
79-84,34-46
|
||||||
|
8-9,9-71
|
||||||
|
43-70,22-70
|
||||||
|
11-95,9-11
|
||||||
|
31-43,13-30
|
||||||
|
21-54,53-55
|
||||||
|
36-88,54-89
|
||||||
|
58-58,27-57
|
||||||
|
78-96,97-99
|
||||||
|
15-53,52-54
|
||||||
|
9-72,4-9
|
||||||
|
22-30,22-27
|
||||||
|
5-96,5-95
|
||||||
|
19-25,19-77
|
||||||
|
66-90,66-97
|
||||||
|
90-92,52-91
|
||||||
|
14-14,15-26
|
||||||
|
57-62,58-61
|
||||||
|
20-62,62-62
|
||||||
|
34-97,34-35
|
||||||
|
12-92,13-13
|
||||||
|
91-93,16-92
|
||||||
|
23-83,82-84
|
||||||
|
96-98,9-97
|
||||||
|
75-76,75-82
|
||||||
|
24-84,23-25
|
||||||
|
2-29,2-30
|
||||||
|
22-35,21-86
|
||||||
|
43-92,66-92
|
||||||
|
15-88,14-92
|
||||||
|
32-37,38-67
|
||||||
|
76-96,76-95
|
||||||
|
86-88,2-87
|
||||||
|
7-98,1-6
|
||||||
|
35-93,35-94
|
||||||
|
13-96,1-12
|
||||||
|
24-69,23-70
|
||||||
|
73-79,2-73
|
||||||
|
14-89,14-73
|
||||||
|
34-60,61-75
|
||||||
|
14-21,15-22
|
||||||
|
26-86,24-25
|
||||||
|
30-96,31-93
|
||||||
|
9-95,94-98
|
||||||
|
83-85,3-84
|
||||||
|
16-96,95-97
|
||||||
|
12-13,13-35
|
||||||
|
57-66,57-65
|
||||||
|
18-59,19-60
|
||||||
|
34-70,91-96
|
||||||
|
74-90,58-84
|
||||||
|
47-47,48-88
|
||||||
|
47-48,15-48
|
||||||
|
97-97,12-98
|
||||||
|
57-89,57-71
|
||||||
|
79-90,79-84
|
||||||
|
14-36,6-35
|
||||||
|
13-97,46-97
|
||||||
|
49-94,93-93
|
||||||
|
73-96,54-74
|
||||||
|
29-31,21-38
|
||||||
|
24-98,26-46
|
||||||
|
71-80,78-81
|
||||||
|
10-90,89-91
|
||||||
|
65-99,66-98
|
||||||
|
28-62,29-62
|
||||||
|
4-97,96-96
|
||||||
|
32-98,31-31
|
||||||
|
51-63,52-62
|
||||||
|
12-44,13-29
|
||||||
|
8-28,1-26
|
||||||
|
9-99,6-10
|
||||||
|
36-64,35-35
|
||||||
|
51-65,52-91
|
||||||
|
26-26,27-32
|
||||||
|
30-91,30-90
|
||||||
|
34-35,34-98
|
||||||
|
6-60,5-60
|
||||||
|
11-12,10-12
|
||||||
|
1-99,99-99
|
||||||
|
80-82,79-82
|
||||||
|
23-89,23-89
|
||||||
|
39-90,89-93
|
||||||
|
55-64,64-64
|
||||||
|
19-19,20-82
|
||||||
|
3-89,1-90
|
||||||
|
2-73,74-92
|
||||||
|
7-48,6-47
|
||||||
|
3-58,7-99
|
||||||
|
32-94,10-93
|
||||||
|
54-56,53-56
|
||||||
|
90-90,7-89
|
||||||
|
73-73,34-74
|
||||||
|
70-91,71-91
|
||||||
|
11-82,81-84
|
||||||
|
99-99,3-99
|
||||||
|
18-98,19-90
|
||||||
|
23-56,24-57
|
||||||
|
59-59,58-59
|
||||||
|
9-85,98-99
|
||||||
|
41-58,41-73
|
||||||
|
38-82,37-81
|
||||||
|
42-97,41-42
|
||||||
|
1-14,10-52
|
||||||
|
10-93,11-93
|
||||||
|
81-92,38-91
|
||||||
|
15-97,14-94
|
||||||
|
2-94,37-82
|
||||||
|
27-98,28-97
|
||||||
|
92-93,3-93
|
||||||
|
79-95,18-79
|
||||||
|
9-14,9-61
|
||||||
|
3-99,18-97
|
||||||
|
66-98,65-99
|
||||||
|
27-42,26-28
|
||||||
|
7-8,8-34
|
||||||
|
38-97,16-38
|
||||||
|
22-89,21-85
|
||||||
|
18-69,5-59
|
||||||
|
4-89,3-5
|
||||||
|
17-24,17-98
|
||||||
|
2-14,2-21
|
||||||
|
33-77,53-78
|
||||||
|
2-87,3-29
|
||||||
|
29-35,32-36
|
||||||
|
77-78,44-77
|
||||||
|
3-93,92-97
|
||||||
|
5-97,5-99
|
||||||
|
3-21,21-21
|
||||||
|
41-86,54-82
|
||||||
|
7-96,95-99
|
||||||
|
43-43,44-66
|
||||||
|
16-18,17-67
|
||||||
|
12-13,12-86
|
||||||
|
7-74,2-73
|
||||||
|
3-77,11-78
|
||||||
|
1-27,28-44
|
||||||
|
2-73,1-74
|
||||||
|
3-96,3-97
|
||||||
|
75-90,15-75
|
||||||
|
14-39,14-66
|
||||||
|
3-96,2-97
|
||||||
|
27-80,28-79
|
||||||
|
43-43,41-43
|
||||||
|
17-69,16-70
|
||||||
|
2-43,2-33
|
||||||
|
5-98,5-91
|
||||||
|
3-15,16-78
|
||||||
|
59-85,59-72
|
||||||
|
12-91,8-91
|
||||||
|
25-25,25-73
|
||||||
|
51-70,23-71
|
||||||
|
14-55,15-56
|
||||||
|
26-94,26-95
|
||||||
|
17-92,7-17
|
||||||
|
67-79,66-66
|
||||||
|
54-67,67-67
|
||||||
|
79-81,28-80
|
||||||
|
59-63,64-64
|
||||||
|
17-37,17-81
|
||||||
|
9-93,9-77
|
||||||
|
32-99,32-91
|
||||||
|
20-20,11-21
|
||||||
|
29-95,29-45
|
||||||
|
7-20,19-78
|
||||||
|
76-93,77-80
|
||||||
|
9-9,9-43
|
||||||
|
35-75,35-53
|
||||||
|
23-81,22-81
|
||||||
|
9-94,24-94
|
||||||
|
16-84,3-85
|
||||||
|
12-79,10-79
|
||||||
|
2-4,5-92
|
||||||
|
33-97,15-98
|
||||||
|
7-40,11-40
|
||||||
|
55-77,56-77
|
||||||
|
47-63,46-62
|
||||||
|
26-88,5-69
|
||||||
|
4-98,3-98
|
||||||
|
8-23,2-23
|
||||||
|
2-67,1-68
|
||||||
|
10-72,11-61
|
||||||
|
52-55,54-56
|
||||||
|
28-38,27-38
|
||||||
|
1-2,1-93
|
||||||
|
96-96,90-96
|
||||||
|
7-89,6-78
|
||||||
|
1-71,71-72
|
||||||
|
1-34,33-33
|
||||||
|
29-57,29-58
|
||||||
|
17-99,2-98
|
||||||
|
42-88,89-89
|
||||||
|
22-27,26-69
|
||||||
|
31-91,24-91
|
||||||
|
6-29,5-6
|
||||||
|
4-95,3-3
|
||||||
|
8-94,5-8
|
||||||
|
26-84,80-85
|
||||||
|
37-92,37-91
|
||||||
|
17-42,17-50
|
||||||
|
44-73,23-74
|
||||||
|
7-43,33-83
|
||||||
|
12-30,29-57
|
||||||
|
27-74,73-75
|
||||||
|
23-63,63-97
|
||||||
|
1-68,2-68
|
||||||
|
32-92,32-94
|
||||||
|
12-54,11-66
|
||||||
|
64-76,65-95
|
||||||
|
29-99,29-61
|
||||||
|
11-34,10-34
|
||||||
|
7-18,19-34
|
||||||
|
35-86,34-86
|
||||||
|
37-83,37-38
|
||||||
|
36-37,36-92
|
||||||
|
33-36,41-84
|
||||||
|
5-71,3-70
|
||||||
|
18-42,43-53
|
||||||
|
85-87,20-86
|
||||||
|
24-88,23-89
|
||||||
|
57-96,11-58
|
||||||
|
5-28,22-29
|
||||||
|
8-88,7-94
|
||||||
|
4-6,5-87
|
||||||
|
5-23,22-90
|
||||||
|
1-99,99-99
|
||||||
|
18-32,33-91
|
||||||
|
5-8,9-94
|
||||||
|
2-6,6-44
|
||||||
|
3-82,4-82
|
||||||
|
24-62,44-63
|
||||||
|
47-51,46-51
|
||||||
|
98-98,61-76
|
||||||
|
9-16,5-8
|
||||||
|
41-76,75-77
|
||||||
|
44-89,43-88
|
||||||
|
2-88,1-91
|
||||||
|
42-91,7-91
|
||||||
|
23-87,87-87
|
||||||
|
7-76,7-64
|
||||||
|
82-91,80-90
|
||||||
|
54-85,53-95
|
||||||
|
57-89,76-89
|
||||||
|
4-90,91-91
|
||||||
|
43-43,44-88
|
||||||
|
5-93,4-92
|
||||||
|
65-85,15-41
|
||||||
|
1-47,1-95
|
||||||
|
10-91,10-92
|
||||||
|
97-99,5-97
|
||||||
|
1-99,1-2
|
||||||
|
2-72,2-71
|
||||||
|
5-6,6-11
|
||||||
|
52-91,50-53
|
||||||
|
70-96,71-97
|
||||||
|
70-76,51-70
|
||||||
|
2-13,1-44
|
||||||
|
28-81,29-80
|
||||||
|
35-79,36-79
|
||||||
|
45-68,44-72
|
||||||
|
85-94,3-76
|
||||||
|
3-3,2-4
|
||||||
|
33-54,54-63
|
||||||
|
2-71,70-95
|
||||||
|
32-35,37-44
|
||||||
|
15-50,15-16
|
||||||
|
7-62,6-97
|
||||||
|
28-45,28-39
|
||||||
|
53-97,52-52
|
||||||
|
58-72,58-73
|
||||||
|
10-86,9-86
|
||||||
|
55-93,22-59
|
||||||
|
32-61,32-98
|
||||||
|
7-97,99-99
|
||||||
|
13-49,37-50
|
||||||
|
33-65,65-65
|
||||||
|
22-37,21-69
|
||||||
|
88-98,28-89
|
||||||
|
41-92,42-75
|
||||||
|
60-82,14-61
|
||||||
|
3-91,4-28
|
||||||
|
18-57,17-17
|
||||||
|
34-96,35-99
|
||||||
|
1-87,77-84
|
||||||
|
2-8,7-95
|
||||||
|
5-97,4-98
|
||||||
|
46-46,47-87
|
||||||
|
92-93,17-92
|
||||||
|
36-74,37-48
|
||||||
|
24-80,24-81
|
||||||
|
6-10,10-99
|
||||||
|
6-55,3-56
|
||||||
|
8-74,19-63
|
||||||
|
28-28,13-28
|
||||||
|
2-19,19-64
|
||||||
|
36-54,15-54
|
||||||
|
2-80,6-80
|
||||||
|
63-64,64-90
|
||||||
|
20-97,20-72
|
||||||
|
4-80,4-5
|
||||||
|
15-17,16-71
|
||||||
|
4-20,19-21
|
||||||
|
23-49,13-62
|
||||||
|
37-96,36-94
|
||||||
|
12-13,12-63
|
||||||
|
28-79,78-78
|
||||||
|
3-79,3-4
|
||||||
|
54-74,20-70
|
||||||
|
29-91,8-30
|
||||||
|
5-6,5-48
|
||||||
|
14-61,13-62
|
||||||
|
18-90,17-91
|
||||||
|
89-99,69-89
|
||||||
|
12-87,11-88
|
||||||
|
22-66,51-65
|
||||||
|
7-93,1-7
|
||||||
|
59-69,55-81
|
||||||
|
35-54,53-55
|
||||||
|
52-97,28-53
|
||||||
|
69-71,32-70
|
||||||
|
18-85,84-86
|
||||||
|
3-49,4-48
|
||||||
|
26-27,26-40
|
||||||
|
94-96,16-95
|
||||||
|
5-50,76-95
|
||||||
|
90-96,9-95
|
||||||
|
84-85,13-75
|
||||||
|
4-31,5-30
|
||||||
|
1-87,1-89
|
||||||
|
77-79,32-78
|
||||||
|
25-79,5-41
|
||||||
|
71-73,24-72
|
||||||
|
22-67,23-66
|
||||||
|
5-74,19-74
|
||||||
|
82-94,23-83
|
||||||
|
48-58,42-57
|
||||||
|
3-84,2-93
|
||||||
|
6-99,3-99
|
||||||
|
6-89,7-16
|
||||||
|
24-69,24-25
|
||||||
|
16-80,81-92
|
||||||
|
4-48,9-48
|
||||||
|
1-98,2-70
|
||||||
|
67-78,72-78
|
||||||
|
27-39,26-28
|
||||||
|
3-98,2-2
|
||||||
|
95-97,9-96
|
||||||
|
73-88,72-89
|
||||||
|
14-94,95-95
|
||||||
|
1-62,63-75
|
||||||
|
12-76,11-11
|
||||||
|
95-95,86-96
|
||||||
|
19-38,1-23
|
||||||
|
42-87,42-86
|
||||||
|
7-75,8-74
|
||||||
|
5-7,6-40
|
||||||
|
49-52,49-66
|
||||||
|
80-85,83-85
|
||||||
|
7-44,8-43
|
||||||
|
71-94,62-67
|
||||||
|
97-97,26-97
|
||||||
|
3-98,2-99
|
||||||
|
29-29,30-99
|
||||||
|
3-65,1-66
|
||||||
|
2-3,4-29
|
||||||
|
46-95,99-99
|
||||||
|
91-96,13-90
|
||||||
|
2-85,3-84
|
||||||
|
40-87,40-70
|
||||||
|
36-49,38-48
|
||||||
|
30-49,34-50
|
||||||
|
25-69,51-68
|
||||||
|
90-95,71-81
|
||||||
|
65-99,66-87
|
||||||
|
14-63,13-63
|
||||||
|
13-94,95-97
|
||||||
|
91-91,55-91
|
||||||
|
30-65,65-81
|
||||||
|
18-44,43-70
|
||||||
|
14-44,13-15
|
||||||
|
73-94,88-89
|
||||||
|
12-71,47-58
|
||||||
|
47-84,73-84
|
||||||
|
20-57,17-72
|
||||||
|
30-50,30-30
|
||||||
|
22-23,22-66
|
||||||
|
14-38,32-43
|
||||||
|
11-83,12-83
|
||||||
|
21-58,11-58
|
||||||
|
41-86,40-87
|
||||||
|
5-73,72-82
|
||||||
|
38-64,15-39
|
||||||
|
38-39,14-39
|
||||||
|
12-94,2-13
|
||||||
|
39-55,56-56
|
||||||
|
88-89,88-89
|
||||||
|
2-7,2-99
|
||||||
|
91-94,38-91
|
||||||
|
12-81,11-94
|
||||||
|
9-87,9-83
|
||||||
|
79-82,31-79
|
||||||
|
23-32,24-31
|
||||||
|
9-99,8-99
|
||||||
|
54-66,54-63
|
||||||
|
33-96,95-97
|
||||||
|
21-88,21-87
|
||||||
|
15-81,17-80
|
||||||
|
38-91,39-92
|
||||||
|
22-59,59-94
|
||||||
|
26-99,26-37
|
||||||
|
1-91,2-98
|
||||||
|
11-59,11-95
|
||||||
|
35-76,61-77
|
||||||
|
84-94,19-80
|
||||||
|
49-55,55-74
|
||||||
|
37-99,36-98
|
||||||
|
47-85,46-46
|
||||||
|
66-72,35-66
|
||||||
|
61-96,32-96
|
||||||
|
14-57,75-76
|
||||||
|
3-97,2-97
|
||||||
|
90-92,66-95
|
||||||
|
89-95,88-94
|
||||||
|
36-94,94-98
|
||||||
|
22-24,23-40
|
||||||
|
99-99,19-97
|
||||||
|
19-86,10-85
|
||||||
|
23-61,51-61
|
||||||
|
63-63,8-63
|
||||||
|
5-80,80-80
|
||||||
|
7-7,8-90
|
||||||
|
9-75,9-10
|
||||||
|
14-68,17-67
|
||||||
|
72-99,71-72
|
||||||
|
19-78,13-79
|
||||||
|
95-99,8-96
|
||||||
|
31-33,32-32
|
||||||
|
12-87,11-88
|
||||||
|
22-56,56-93
|
||||||
|
98-99,21-97
|
||||||
|
2-24,3-13
|
||||||
|
3-99,3-97
|
||||||
|
13-88,38-68
|
||||||
|
64-84,42-85
|
||||||
|
37-70,36-36
|
||||||
|
26-50,25-44
|
||||||
|
43-73,42-79
|
||||||
|
5-5,6-31
|
||||||
|
52-57,42-58
|
||||||
|
16-22,22-98
|
||||||
|
9-76,8-89
|
||||||
|
29-69,29-68
|
||||||
|
10-11,11-85
|
||||||
|
2-45,1-46
|
||||||
|
29-51,41-52
|
||||||
|
98-99,2-96
|
||||||
|
7-97,94-98
|
||||||
|
12-92,11-13
|
||||||
|
79-83,41-82
|
||||||
|
29-92,93-94
|
||||||
|
2-71,4-72
|
||||||
|
7-99,6-6
|
||||||
|
8-99,8-89
|
||||||
|
51-81,51-80
|
||||||
|
73-80,62-80
|
||||||
|
5-99,5-97
|
||||||
|
22-66,21-65
|
||||||
|
46-97,28-47
|
||||||
|
13-72,18-71
|
||||||
|
30-85,31-91
|
||||||
|
69-78,78-78
|
||||||
|
36-80,37-45
|
||||||
|
2-65,1-1
|
||||||
|
32-32,30-32
|
||||||
|
4-90,2-91
|
||||||
|
32-52,52-71
|
||||||
|
9-21,6-20
|
||||||
|
13-13,14-20
|
||||||
|
11-98,12-92
|
||||||
|
11-86,87-91
|
||||||
|
24-62,25-62
|
||||||
|
18-76,17-76
|
||||||
|
17-93,18-95
|
||||||
|
44-44,45-80
|
||||||
|
6-61,5-5
|
||||||
|
50-58,25-59
|
||||||
|
91-91,37-90
|
||||||
|
13-70,12-14
|
||||||
|
91-99,17-90
|
||||||
|
4-98,4-99
|
||||||
|
34-87,35-79
|
||||||
|
33-69,28-68
|
||||||
|
13-28,7-27
|
||||||
|
41-47,40-42
|
||||||
|
83-83,84-85
|
||||||
|
42-63,44-56
|
||||||
|
6-94,94-94
|
||||||
|
18-98,98-98
|
||||||
|
30-32,31-65
|
||||||
|
20-37,20-38
|
||||||
|
18-55,40-41
|
||||||
|
43-53,52-86
|
||||||
|
27-30,29-81
|
||||||
|
17-91,17-76
|
||||||
|
1-7,7-95
|
||||||
|
20-38,39-93
|
||||||
|
70-73,4-77
|
||||||
|
34-36,34-88
|
||||||
|
65-94,93-96
|
||||||
|
7-70,6-6
|
||||||
|
19-65,21-64
|
||||||
|
34-97,96-96
|
||||||
|
71-84,70-77
|
||||||
|
15-80,80-80
|
||||||
|
12-97,10-11
|
||||||
|
45-95,94-99
|
||||||
|
72-72,2-72
|
||||||
|
41-41,42-47
|
||||||
|
62-76,77-77
|
||||||
|
3-88,4-96
|
||||||
|
21-83,20-84
|
||||||
|
4-98,3-98
|
||||||
|
96-98,57-97
|
||||||
|
51-92,50-96
|
||||||
|
37-90,36-38
|
||||||
|
23-90,22-22
|
||||||
|
35-76,76-76
|
||||||
|
15-54,15-53
|
||||||
|
37-81,37-38
|
||||||
|
19-51,50-52
|
||||||
|
3-18,16-71
|
||||||
|
55-55,53-55
|
||||||
|
34-92,35-91
|
||||||
|
4-59,4-58
|
||||||
|
15-94,1-93
|
||||||
|
34-34,35-82
|
||||||
|
27-96,27-56
|
||||||
|
54-58,54-84
|
||||||
|
90-91,6-99
|
||||||
|
1-77,1-94
|
||||||
|
9-98,10-95
|
||||||
|
40-97,20-64
|
||||||
|
49-62,82-98
|
||||||
|
9-97,9-98
|
||||||
|
16-84,16-99
|
||||||
|
13-95,61-96
|
||||||
|
15-98,7-99
|
||||||
|
94-95,30-86
|
||||||
|
6-23,6-66
|
||||||
|
4-65,3-4
|
||||||
|
41-92,45-93
|
||||||
|
3-58,3-59
|
||||||
|
42-49,48-70
|
||||||
|
95-97,84-96
|
||||||
|
10-42,9-11
|
||||||
|
22-92,21-90
|
||||||
|
46-46,21-46
|
||||||
|
48-65,47-64
|
||||||
|
4-14,14-67
|
||||||
|
25-65,42-65
|
||||||
|
38-41,5-40
|
||||||
|
1-2,1-93
|
||||||
|
40-78,13-77
|
||||||
|
58-96,58-99
|
||||||
|
69-97,69-95
|
||||||
|
6-94,7-95
|
||||||
|
32-43,31-53
|
||||||
|
17-80,16-18
|
||||||
|
22-65,64-64
|
||||||
|
62-63,10-62
|
||||||
|
3-99,2-98
|
||||||
|
23-92,23-24
|
||||||
|
92-92,19-93
|
||||||
|
3-94,3-96
|
||||||
@@ -0,0 +1,67 @@
|
|||||||
|
import operator
|
||||||
|
from collections.abc import Callable
|
||||||
|
from dataclasses import dataclass
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
|
||||||
|
@dataclass(frozen=True, slots=True)
|
||||||
|
class Range:
|
||||||
|
lower: int
|
||||||
|
upper: int
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def from_pair(cls, s: str) -> "Range":
|
||||||
|
left, right = [int(num) for num in s.split("-")]
|
||||||
|
return cls(left, right)
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def _compare(a: "Range", b: "Range", _op: Callable[[bool, bool], bool]):
|
||||||
|
if _op(
|
||||||
|
b.lower <= a.lower <= b.upper,
|
||||||
|
b.lower <= a.upper <= b.upper,
|
||||||
|
):
|
||||||
|
return True
|
||||||
|
|
||||||
|
if _op(
|
||||||
|
a.lower <= b.lower <= a.upper,
|
||||||
|
a.lower <= b.upper <= a.upper,
|
||||||
|
):
|
||||||
|
return True
|
||||||
|
|
||||||
|
return False
|
||||||
|
|
||||||
|
def fully_contains(self, other: "Range") -> bool:
|
||||||
|
return Range._compare(self, other, operator.and_)
|
||||||
|
|
||||||
|
def overlaps(self, other: "Range") -> bool:
|
||||||
|
return Range._compare(self, other, operator.or_)
|
||||||
|
|
||||||
|
|
||||||
|
def part1(data: str) -> int:
|
||||||
|
count = 0
|
||||||
|
for line in data.splitlines():
|
||||||
|
left, right = [Range.from_pair(s) for s in line.split(",")]
|
||||||
|
if left.fully_contains(right):
|
||||||
|
count += 1
|
||||||
|
return count
|
||||||
|
|
||||||
|
|
||||||
|
def part2(data: str) -> int:
|
||||||
|
count = 0
|
||||||
|
for line in data.splitlines():
|
||||||
|
left, right = [Range.from_pair(s) for s in line.split(",")]
|
||||||
|
if left.overlaps(right):
|
||||||
|
count += 1
|
||||||
|
return count
|
||||||
|
|
||||||
|
|
||||||
|
# Setup
|
||||||
|
data = (Path(__file__).parents[1] / "input").read_text()
|
||||||
|
|
||||||
|
# Problem solving - part 1
|
||||||
|
result = part1(data)
|
||||||
|
print(f"Part 1 solution: {result}")
|
||||||
|
|
||||||
|
# Problem solving - part 2
|
||||||
|
result = part2(data)
|
||||||
|
print(f"Part 2 solution: {result}")
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
import pytest
|
||||||
|
|
||||||
|
from solution import Range, part1, part2
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture
|
||||||
|
def example() -> str:
|
||||||
|
return """2-4,6-8
|
||||||
|
2-3,4-5
|
||||||
|
5-7,7-9
|
||||||
|
2-8,3-7
|
||||||
|
6-6,4-6
|
||||||
|
2-6,4-8"""
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.parametrize(
|
||||||
|
"a,b,expected",
|
||||||
|
[
|
||||||
|
(Range(2, 4), Range(3, 4), True),
|
||||||
|
(Range(2, 4), Range(1, 4), True),
|
||||||
|
(Range(2, 4), Range(2, 4), True),
|
||||||
|
(Range(4, 4), Range(3, 4), True),
|
||||||
|
(Range(2, 4), Range(3, 5), False),
|
||||||
|
(Range(4, 4), Range(3, 3), False),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
def test_range_fully_contains(a: Range, b: Range, expected: bool) -> None:
|
||||||
|
assert a.fully_contains(b) == expected
|
||||||
|
assert b.fully_contains(a) == expected
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.parametrize(
|
||||||
|
"a,b,expected",
|
||||||
|
[
|
||||||
|
(Range(5, 7), Range(7, 9), True),
|
||||||
|
(Range(2, 8), Range(3, 7), True),
|
||||||
|
(Range(6, 6), Range(4, 6), True),
|
||||||
|
(Range(2, 6), Range(4, 8), True),
|
||||||
|
(Range(5, 7), Range(8, 9), False),
|
||||||
|
(Range(2, 3), Range(5, 7), False),
|
||||||
|
(Range(6, 6), Range(4, 5), False),
|
||||||
|
(Range(2, 2), Range(4, 4), False),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
def test_range_overlaps(a: Range, b: Range, expected: bool) -> None:
|
||||||
|
assert a.overlaps(b) == expected
|
||||||
|
assert b.overlaps(a) == expected
|
||||||
|
|
||||||
|
|
||||||
|
def test_part1(example: str) -> None:
|
||||||
|
assert part1(example) == 2
|
||||||
|
|
||||||
|
|
||||||
|
def test_part2(example: str) -> None:
|
||||||
|
assert part2(example) == 4
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
DOIT_CONFIG = {"action_string_formatting": "new"}
|
||||||
|
|
||||||
|
|
||||||
|
def task_test():
|
||||||
|
return {
|
||||||
|
"params": [
|
||||||
|
{"name": "day", "short": "d", "long": "day", "type": int, "default": 1}
|
||||||
|
],
|
||||||
|
"actions": ["pytest {day:02}/py"],
|
||||||
|
"verbosity": 2,
|
||||||
|
}
|
||||||
Generated
+355
@@ -0,0 +1,355 @@
|
|||||||
|
# This file is automatically @generated by Poetry and should not be changed by hand.
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "attrs"
|
||||||
|
version = "22.1.0"
|
||||||
|
description = "Classes Without Boilerplate"
|
||||||
|
category = "dev"
|
||||||
|
optional = false
|
||||||
|
python-versions = ">=3.5"
|
||||||
|
files = [
|
||||||
|
{file = "attrs-22.1.0-py2.py3-none-any.whl", hash = "sha256:86efa402f67bf2df34f51a335487cf46b1ec130d02b8d39fd248abfd30da551c"},
|
||||||
|
{file = "attrs-22.1.0.tar.gz", hash = "sha256:29adc2665447e5191d0e7c568fde78b21f9672d344281d0c6e1ab085429b22b6"},
|
||||||
|
]
|
||||||
|
|
||||||
|
[package.extras]
|
||||||
|
dev = ["cloudpickle", "coverage[toml] (>=5.0.2)", "furo", "hypothesis", "mypy (>=0.900,!=0.940)", "pre-commit", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "sphinx", "sphinx-notfound-page", "zope.interface"]
|
||||||
|
docs = ["furo", "sphinx", "sphinx-notfound-page", "zope.interface"]
|
||||||
|
tests = ["cloudpickle", "coverage[toml] (>=5.0.2)", "hypothesis", "mypy (>=0.900,!=0.940)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "zope.interface"]
|
||||||
|
tests-no-zope = ["cloudpickle", "coverage[toml] (>=5.0.2)", "hypothesis", "mypy (>=0.900,!=0.940)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins"]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "black"
|
||||||
|
version = "22.12.0"
|
||||||
|
description = "The uncompromising code formatter."
|
||||||
|
category = "dev"
|
||||||
|
optional = false
|
||||||
|
python-versions = ">=3.7"
|
||||||
|
files = [
|
||||||
|
{file = "black-22.12.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9eedd20838bd5d75b80c9f5487dbcb06836a43833a37846cf1d8c1cc01cef59d"},
|
||||||
|
{file = "black-22.12.0-cp310-cp310-win_amd64.whl", hash = "sha256:159a46a4947f73387b4d83e87ea006dbb2337eab6c879620a3ba52699b1f4351"},
|
||||||
|
{file = "black-22.12.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d30b212bffeb1e252b31dd269dfae69dd17e06d92b87ad26e23890f3efea366f"},
|
||||||
|
{file = "black-22.12.0-cp311-cp311-win_amd64.whl", hash = "sha256:7412e75863aa5c5411886804678b7d083c7c28421210180d67dfd8cf1221e1f4"},
|
||||||
|
{file = "black-22.12.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c116eed0efb9ff870ded8b62fe9f28dd61ef6e9ddd28d83d7d264a38417dcee2"},
|
||||||
|
{file = "black-22.12.0-cp37-cp37m-win_amd64.whl", hash = "sha256:1f58cbe16dfe8c12b7434e50ff889fa479072096d79f0a7f25e4ab8e94cd8350"},
|
||||||
|
{file = "black-22.12.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:77d86c9f3db9b1bf6761244bc0b3572a546f5fe37917a044e02f3166d5aafa7d"},
|
||||||
|
{file = "black-22.12.0-cp38-cp38-win_amd64.whl", hash = "sha256:82d9fe8fee3401e02e79767016b4907820a7dc28d70d137eb397b92ef3cc5bfc"},
|
||||||
|
{file = "black-22.12.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:101c69b23df9b44247bd88e1d7e90154336ac4992502d4197bdac35dd7ee3320"},
|
||||||
|
{file = "black-22.12.0-cp39-cp39-win_amd64.whl", hash = "sha256:559c7a1ba9a006226f09e4916060982fd27334ae1998e7a38b3f33a37f7a2148"},
|
||||||
|
{file = "black-22.12.0-py3-none-any.whl", hash = "sha256:436cc9167dd28040ad90d3b404aec22cedf24a6e4d7de221bec2730ec0c97bcf"},
|
||||||
|
{file = "black-22.12.0.tar.gz", hash = "sha256:229351e5a18ca30f447bf724d007f890f97e13af070bb6ad4c0a441cd7596a2f"},
|
||||||
|
]
|
||||||
|
|
||||||
|
[package.dependencies]
|
||||||
|
click = ">=8.0.0"
|
||||||
|
mypy-extensions = ">=0.4.3"
|
||||||
|
pathspec = ">=0.9.0"
|
||||||
|
platformdirs = ">=2"
|
||||||
|
tomli = {version = ">=1.1.0", markers = "python_full_version < \"3.11.0a7\""}
|
||||||
|
|
||||||
|
[package.extras]
|
||||||
|
colorama = ["colorama (>=0.4.3)"]
|
||||||
|
d = ["aiohttp (>=3.7.4)"]
|
||||||
|
jupyter = ["ipython (>=7.8.0)", "tokenize-rt (>=3.2.0)"]
|
||||||
|
uvloop = ["uvloop (>=0.15.2)"]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "click"
|
||||||
|
version = "8.1.3"
|
||||||
|
description = "Composable command line interface toolkit"
|
||||||
|
category = "dev"
|
||||||
|
optional = false
|
||||||
|
python-versions = ">=3.7"
|
||||||
|
files = [
|
||||||
|
{file = "click-8.1.3-py3-none-any.whl", hash = "sha256:bb4d8133cb15a609f44e8213d9b391b0809795062913b383c62be0ee95b1db48"},
|
||||||
|
{file = "click-8.1.3.tar.gz", hash = "sha256:7682dc8afb30297001674575ea00d1814d808d6a36af415a82bd481d37ba7b8e"},
|
||||||
|
]
|
||||||
|
|
||||||
|
[package.dependencies]
|
||||||
|
colorama = {version = "*", markers = "platform_system == \"Windows\""}
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "cloudpickle"
|
||||||
|
version = "2.2.0"
|
||||||
|
description = "Extended pickling support for Python objects"
|
||||||
|
category = "dev"
|
||||||
|
optional = false
|
||||||
|
python-versions = ">=3.6"
|
||||||
|
files = [
|
||||||
|
{file = "cloudpickle-2.2.0-py3-none-any.whl", hash = "sha256:7428798d5926d8fcbfd092d18d01a2a03daf8237d8fcdc8095d256b8490796f0"},
|
||||||
|
{file = "cloudpickle-2.2.0.tar.gz", hash = "sha256:3f4219469c55453cfe4737e564b67c2a149109dabf7f242478948b895f61106f"},
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "colorama"
|
||||||
|
version = "0.4.6"
|
||||||
|
description = "Cross-platform colored terminal text."
|
||||||
|
category = "dev"
|
||||||
|
optional = false
|
||||||
|
python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7"
|
||||||
|
files = [
|
||||||
|
{file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"},
|
||||||
|
{file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"},
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "doit"
|
||||||
|
version = "0.36.0"
|
||||||
|
description = "doit - Automation Tool"
|
||||||
|
category = "dev"
|
||||||
|
optional = false
|
||||||
|
python-versions = ">=3.8"
|
||||||
|
files = [
|
||||||
|
{file = "doit-0.36.0-py3-none-any.whl", hash = "sha256:ebc285f6666871b5300091c26eafdff3de968a6bd60ea35dd1e3fc6f2e32479a"},
|
||||||
|
{file = "doit-0.36.0.tar.gz", hash = "sha256:71d07ccc9514cb22fe59d98999577665eaab57e16f644d04336ae0b4bae234bc"},
|
||||||
|
]
|
||||||
|
|
||||||
|
[package.dependencies]
|
||||||
|
cloudpickle = "*"
|
||||||
|
importlib-metadata = ">=4.4"
|
||||||
|
|
||||||
|
[package.extras]
|
||||||
|
toml = ["tomli"]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "exceptiongroup"
|
||||||
|
version = "1.0.4"
|
||||||
|
description = "Backport of PEP 654 (exception groups)"
|
||||||
|
category = "dev"
|
||||||
|
optional = false
|
||||||
|
python-versions = ">=3.7"
|
||||||
|
files = [
|
||||||
|
{file = "exceptiongroup-1.0.4-py3-none-any.whl", hash = "sha256:542adf9dea4055530d6e1279602fa5cb11dab2395fa650b8674eaec35fc4a828"},
|
||||||
|
{file = "exceptiongroup-1.0.4.tar.gz", hash = "sha256:bd14967b79cd9bdb54d97323216f8fdf533e278df937aa2a90089e7d6e06e5ec"},
|
||||||
|
]
|
||||||
|
|
||||||
|
[package.extras]
|
||||||
|
test = ["pytest (>=6)"]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "flake8"
|
||||||
|
version = "6.0.0"
|
||||||
|
description = "the modular source code checker: pep8 pyflakes and co"
|
||||||
|
category = "dev"
|
||||||
|
optional = false
|
||||||
|
python-versions = ">=3.8.1"
|
||||||
|
files = [
|
||||||
|
{file = "flake8-6.0.0-py2.py3-none-any.whl", hash = "sha256:3833794e27ff64ea4e9cf5d410082a8b97ff1a06c16aa3d2027339cd0f1195c7"},
|
||||||
|
{file = "flake8-6.0.0.tar.gz", hash = "sha256:c61007e76655af75e6785a931f452915b371dc48f56efd765247c8fe68f2b181"},
|
||||||
|
]
|
||||||
|
|
||||||
|
[package.dependencies]
|
||||||
|
mccabe = ">=0.7.0,<0.8.0"
|
||||||
|
pycodestyle = ">=2.10.0,<2.11.0"
|
||||||
|
pyflakes = ">=3.0.0,<3.1.0"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "importlib-metadata"
|
||||||
|
version = "5.1.0"
|
||||||
|
description = "Read metadata from Python packages"
|
||||||
|
category = "dev"
|
||||||
|
optional = false
|
||||||
|
python-versions = ">=3.7"
|
||||||
|
files = [
|
||||||
|
{file = "importlib_metadata-5.1.0-py3-none-any.whl", hash = "sha256:d84d17e21670ec07990e1044a99efe8d615d860fd176fc29ef5c306068fda313"},
|
||||||
|
{file = "importlib_metadata-5.1.0.tar.gz", hash = "sha256:d5059f9f1e8e41f80e9c56c2ee58811450c31984dfa625329ffd7c0dad88a73b"},
|
||||||
|
]
|
||||||
|
|
||||||
|
[package.dependencies]
|
||||||
|
zipp = ">=0.5"
|
||||||
|
|
||||||
|
[package.extras]
|
||||||
|
docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)"]
|
||||||
|
perf = ["ipython"]
|
||||||
|
testing = ["flake8 (<5)", "flufl.flake8", "importlib-resources (>=1.3)", "packaging", "pyfakefs", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)", "pytest-perf (>=0.9.2)"]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "iniconfig"
|
||||||
|
version = "1.1.1"
|
||||||
|
description = "iniconfig: brain-dead simple config-ini parsing"
|
||||||
|
category = "dev"
|
||||||
|
optional = false
|
||||||
|
python-versions = "*"
|
||||||
|
files = [
|
||||||
|
{file = "iniconfig-1.1.1-py2.py3-none-any.whl", hash = "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3"},
|
||||||
|
{file = "iniconfig-1.1.1.tar.gz", hash = "sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32"},
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "isort"
|
||||||
|
version = "5.11.2"
|
||||||
|
description = "A Python utility / library to sort Python imports."
|
||||||
|
category = "dev"
|
||||||
|
optional = false
|
||||||
|
python-versions = ">=3.7.0"
|
||||||
|
files = [
|
||||||
|
{file = "isort-5.11.2-py3-none-any.whl", hash = "sha256:e486966fba83f25b8045f8dd7455b0a0d1e4de481e1d7ce4669902d9fb85e622"},
|
||||||
|
{file = "isort-5.11.2.tar.gz", hash = "sha256:dd8bbc5c0990f2a095d754e50360915f73b4c26fc82733eb5bfc6b48396af4d2"},
|
||||||
|
]
|
||||||
|
|
||||||
|
[package.extras]
|
||||||
|
colors = ["colorama (>=0.4.3,<0.5.0)"]
|
||||||
|
pipfile-deprecated-finder = ["pipreqs", "requirementslib"]
|
||||||
|
plugins = ["setuptools"]
|
||||||
|
requirements-deprecated-finder = ["pip-api", "pipreqs"]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "mccabe"
|
||||||
|
version = "0.7.0"
|
||||||
|
description = "McCabe checker, plugin for flake8"
|
||||||
|
category = "dev"
|
||||||
|
optional = false
|
||||||
|
python-versions = ">=3.6"
|
||||||
|
files = [
|
||||||
|
{file = "mccabe-0.7.0-py2.py3-none-any.whl", hash = "sha256:6c2d30ab6be0e4a46919781807b4f0d834ebdd6c6e3dca0bda5a15f863427b6e"},
|
||||||
|
{file = "mccabe-0.7.0.tar.gz", hash = "sha256:348e0240c33b60bbdf4e523192ef919f28cb2c3d7d5c7794f74009290f236325"},
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "mypy-extensions"
|
||||||
|
version = "0.4.3"
|
||||||
|
description = "Experimental type system extensions for programs checked with the mypy typechecker."
|
||||||
|
category = "dev"
|
||||||
|
optional = false
|
||||||
|
python-versions = "*"
|
||||||
|
files = [
|
||||||
|
{file = "mypy_extensions-0.4.3-py2.py3-none-any.whl", hash = "sha256:090fedd75945a69ae91ce1303b5824f428daf5a028d2f6ab8a299250a846f15d"},
|
||||||
|
{file = "mypy_extensions-0.4.3.tar.gz", hash = "sha256:2d82818f5bb3e369420cb3c4060a7970edba416647068eb4c5343488a6c604a8"},
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "packaging"
|
||||||
|
version = "22.0"
|
||||||
|
description = "Core utilities for Python packages"
|
||||||
|
category = "dev"
|
||||||
|
optional = false
|
||||||
|
python-versions = ">=3.7"
|
||||||
|
files = [
|
||||||
|
{file = "packaging-22.0-py3-none-any.whl", hash = "sha256:957e2148ba0e1a3b282772e791ef1d8083648bc131c8ab0c1feba110ce1146c3"},
|
||||||
|
{file = "packaging-22.0.tar.gz", hash = "sha256:2198ec20bd4c017b8f9717e00f0c8714076fc2fd93816750ab48e2c41de2cfd3"},
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "pathspec"
|
||||||
|
version = "0.10.3"
|
||||||
|
description = "Utility library for gitignore style pattern matching of file paths."
|
||||||
|
category = "dev"
|
||||||
|
optional = false
|
||||||
|
python-versions = ">=3.7"
|
||||||
|
files = [
|
||||||
|
{file = "pathspec-0.10.3-py3-none-any.whl", hash = "sha256:3c95343af8b756205e2aba76e843ba9520a24dd84f68c22b9f93251507509dd6"},
|
||||||
|
{file = "pathspec-0.10.3.tar.gz", hash = "sha256:56200de4077d9d0791465aa9095a01d421861e405b5096955051deefd697d6f6"},
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "platformdirs"
|
||||||
|
version = "2.6.0"
|
||||||
|
description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"."
|
||||||
|
category = "dev"
|
||||||
|
optional = false
|
||||||
|
python-versions = ">=3.7"
|
||||||
|
files = [
|
||||||
|
{file = "platformdirs-2.6.0-py3-none-any.whl", hash = "sha256:1a89a12377800c81983db6be069ec068eee989748799b946cce2a6e80dcc54ca"},
|
||||||
|
{file = "platformdirs-2.6.0.tar.gz", hash = "sha256:b46ffafa316e6b83b47489d240ce17173f123a9b9c83282141c3daf26ad9ac2e"},
|
||||||
|
]
|
||||||
|
|
||||||
|
[package.extras]
|
||||||
|
docs = ["furo (>=2022.9.29)", "proselint (>=0.13)", "sphinx (>=5.3)", "sphinx-autodoc-typehints (>=1.19.4)"]
|
||||||
|
test = ["appdirs (==1.4.4)", "pytest (>=7.2)", "pytest-cov (>=4)", "pytest-mock (>=3.10)"]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "pluggy"
|
||||||
|
version = "1.0.0"
|
||||||
|
description = "plugin and hook calling mechanisms for python"
|
||||||
|
category = "dev"
|
||||||
|
optional = false
|
||||||
|
python-versions = ">=3.6"
|
||||||
|
files = [
|
||||||
|
{file = "pluggy-1.0.0-py2.py3-none-any.whl", hash = "sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3"},
|
||||||
|
{file = "pluggy-1.0.0.tar.gz", hash = "sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159"},
|
||||||
|
]
|
||||||
|
|
||||||
|
[package.extras]
|
||||||
|
dev = ["pre-commit", "tox"]
|
||||||
|
testing = ["pytest", "pytest-benchmark"]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "pycodestyle"
|
||||||
|
version = "2.10.0"
|
||||||
|
description = "Python style guide checker"
|
||||||
|
category = "dev"
|
||||||
|
optional = false
|
||||||
|
python-versions = ">=3.6"
|
||||||
|
files = [
|
||||||
|
{file = "pycodestyle-2.10.0-py2.py3-none-any.whl", hash = "sha256:8a4eaf0d0495c7395bdab3589ac2db602797d76207242c17d470186815706610"},
|
||||||
|
{file = "pycodestyle-2.10.0.tar.gz", hash = "sha256:347187bdb476329d98f695c213d7295a846d1152ff4fe9bacb8a9590b8ee7053"},
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "pyflakes"
|
||||||
|
version = "3.0.1"
|
||||||
|
description = "passive checker of Python programs"
|
||||||
|
category = "dev"
|
||||||
|
optional = false
|
||||||
|
python-versions = ">=3.6"
|
||||||
|
files = [
|
||||||
|
{file = "pyflakes-3.0.1-py2.py3-none-any.whl", hash = "sha256:ec55bf7fe21fff7f1ad2f7da62363d749e2a470500eab1b555334b67aa1ef8cf"},
|
||||||
|
{file = "pyflakes-3.0.1.tar.gz", hash = "sha256:ec8b276a6b60bd80defed25add7e439881c19e64850afd9b346283d4165fd0fd"},
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "pytest"
|
||||||
|
version = "7.2.0"
|
||||||
|
description = "pytest: simple powerful testing with Python"
|
||||||
|
category = "dev"
|
||||||
|
optional = false
|
||||||
|
python-versions = ">=3.7"
|
||||||
|
files = [
|
||||||
|
{file = "pytest-7.2.0-py3-none-any.whl", hash = "sha256:892f933d339f068883b6fd5a459f03d85bfcb355e4981e146d2c7616c21fef71"},
|
||||||
|
{file = "pytest-7.2.0.tar.gz", hash = "sha256:c4014eb40e10f11f355ad4e3c2fb2c6c6d1919c73f3b5a433de4708202cade59"},
|
||||||
|
]
|
||||||
|
|
||||||
|
[package.dependencies]
|
||||||
|
attrs = ">=19.2.0"
|
||||||
|
colorama = {version = "*", markers = "sys_platform == \"win32\""}
|
||||||
|
exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""}
|
||||||
|
iniconfig = "*"
|
||||||
|
packaging = "*"
|
||||||
|
pluggy = ">=0.12,<2.0"
|
||||||
|
tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""}
|
||||||
|
|
||||||
|
[package.extras]
|
||||||
|
testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "xmlschema"]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "tomli"
|
||||||
|
version = "2.0.1"
|
||||||
|
description = "A lil' TOML parser"
|
||||||
|
category = "dev"
|
||||||
|
optional = false
|
||||||
|
python-versions = ">=3.7"
|
||||||
|
files = [
|
||||||
|
{file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"},
|
||||||
|
{file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"},
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "zipp"
|
||||||
|
version = "3.11.0"
|
||||||
|
description = "Backport of pathlib-compatible object wrapper for zip files"
|
||||||
|
category = "dev"
|
||||||
|
optional = false
|
||||||
|
python-versions = ">=3.7"
|
||||||
|
files = [
|
||||||
|
{file = "zipp-3.11.0-py3-none-any.whl", hash = "sha256:83a28fcb75844b5c0cdaf5aa4003c2d728c77e05f5aeabe8e95e56727005fbaa"},
|
||||||
|
{file = "zipp-3.11.0.tar.gz", hash = "sha256:a7a22e05929290a67401440b39690ae6563279bced5f314609d9d03798f56766"},
|
||||||
|
]
|
||||||
|
|
||||||
|
[package.extras]
|
||||||
|
docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)"]
|
||||||
|
testing = ["flake8 (<5)", "func-timeout", "jaraco.functools", "jaraco.itertools", "more-itertools", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)"]
|
||||||
|
|
||||||
|
[metadata]
|
||||||
|
lock-version = "2.0"
|
||||||
|
python-versions = "^3.10"
|
||||||
|
content-hash = "2b2edc19b32748e053ae9e3049b2013ad30d49837f8b02c8786d5ded6e839c8b"
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
[tool.poetry]
|
||||||
|
name = "advent-of-code-2022"
|
||||||
|
version = "0.1.0"
|
||||||
|
description = ""
|
||||||
|
authors = ["Adrian Rumpold <a.rumpold@gmail.com>"]
|
||||||
|
readme = "README.md"
|
||||||
|
packages = []
|
||||||
|
|
||||||
|
[tool.poetry.dependencies]
|
||||||
|
python = "^3.10"
|
||||||
|
|
||||||
|
[tool.poetry.group.dev.dependencies]
|
||||||
|
black = "^22.12.0"
|
||||||
|
isort = "^5.11.2"
|
||||||
|
pytest = "^7.2.0"
|
||||||
|
doit = "^0.36.0"
|
||||||
|
flake8 = "^6.0.0"
|
||||||
|
|
||||||
|
[build-system]
|
||||||
|
requires = ["poetry-core"]
|
||||||
|
build-backend = "poetry.core.masonry.api"
|
||||||
|
|
||||||
|
[tool.black]
|
||||||
|
# Source https://github.com/psf/black#configuration-format
|
||||||
|
include = "\\.pyi?$"
|
||||||
|
line-length = 88
|
||||||
|
target-version = ["py39"]
|
||||||
|
|
||||||
|
# Black-compatible settings for isort
|
||||||
|
# See https://black.readthedocs.io/en/stable/compatible_configs.html
|
||||||
|
[tool.isort]
|
||||||
|
line_length = "88"
|
||||||
|
profile = "black"
|
||||||
|
known_first_party = ["solution"]
|
||||||
Reference in new issue
Block a user