Commit 2061912
fix(core): Typing in generic + network (#700)
Supports:
#305
Related : #691 #692
### Overview
1. Updated Mypy
2. Add a new dev script to allow easy reporting on Mypy errors (Using it
in the makefile)
4. fix various type errors (all over core)
#### Old
```
Error Summary
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━┓
┃ File Path ┃ Errors ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━┩
│ core/testcontainers/core/version.py │ 12 │
│ core/testcontainers/core/docker_client.py │ 14 │
│ core/testcontainers/core/network.py │ 4 │
│ core/testcontainers/core/image.py │ 17 │
│ core/testcontainers/core/waiting_utils.py │ 8 │
│ core/testcontainers/core/container.py │ 20 │
│ core/tests/test_new_docker_api.py │ 4 │
│ core/tests/test_docker_in_docker.py │ 2 │
│ core/testcontainers/compose/compose.py │ 22 │
│ core/testcontainers/compose/__init__.py │ 2 │
│ core/testcontainers/core/generic.py │ 1 │
│ core/tests/test_version.py │ 2 │
│ core/tests/test_ryuk.py │ 2 │
│ core/tests/test_registry.py │ 1 │
│ core/tests/test_network.py │ 1 │
│ core/tests/test_labels.py │ 1 │
│ core/tests/test_image.py │ 3 │
│ core/tests/test_docker_client.py │ 1 │
│ core/tests/conftest.py │ 1 │
│ core/tests/test_compose.py │ 7 │
└───────────────────────────────────────────┴────────┘
Found 125 errors in 20 files.
```
#### New
```
Error Summary
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━┓
┃ File Path ┃ Errors ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━┩
│ core/testcontainers/core/version.py │ 12 │
│ core/testcontainers/core/docker_client.py │ 14 │
│ core/testcontainers/core/image.py │ 17 │
│ core/testcontainers/core/waiting_utils.py │ 8 │
│ core/testcontainers/core/container.py │ 20 │
│ core/tests/test_new_docker_api.py │ 4 │
│ core/tests/test_docker_in_docker.py │ 2 │
│ core/testcontainers/compose/compose.py │ 22 │
│ core/testcontainers/compose/__init__.py │ 2 │
│ core/tests/test_version.py │ 2 │
│ core/tests/test_ryuk.py │ 2 │
│ core/tests/test_registry.py │ 1 │
│ core/tests/test_image.py │ 3 │
│ core/tests/test_compose.py │ 7 │
└───────────────────────────────────────────┴────────┘
Found 116 errors in 14 files.
```
---------
Co-authored-by: David Ankin <[email protected]>1 parent a0d4317 commit 2061912
File tree
11 files changed
+100
-54
lines changed- .github/workflows
- core
- testcontainers/core
- tests
- scripts
11 files changed
+100
-54
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
34 | 37 | | |
35 | 38 | | |
36 | 39 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
25 | 27 | | |
26 | 28 | | |
27 | 29 | | |
28 | 30 | | |
29 | | - | |
| 31 | + | |
30 | 32 | | |
31 | 33 | | |
32 | 34 | | |
| |||
40 | 42 | | |
41 | 43 | | |
42 | 44 | | |
43 | | - | |
| 45 | + | |
44 | 46 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
47 | | - | |
| 46 | + | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
| 93 | + | |
94 | 94 | | |
95 | 95 | | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
170 | | - | |
| 170 | + | |
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
| |||
284 | 284 | | |
285 | 285 | | |
286 | 286 | | |
| 287 | + | |
287 | 288 | | |
288 | | - | |
| 289 | + | |
289 | 290 | | |
290 | 291 | | |
291 | 292 | | |
| |||
0 commit comments