-
Notifications
You must be signed in to change notification settings - Fork 313
fix(core): Typing in config + utils #692
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(core): Typing in config + utils #692
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #692 +/- ##
=======================================
Coverage ? 77.19%
=======================================
Files ? 12
Lines ? 605
Branches ? 89
=======================================
Hits ? 467
Misses ? 112
Partials ? 26 ☔ View full report in Codecov by Sentry. |
Note: it will be best to introduce #693 first, rebase and align this. |
Hi, it is important that the build package contains a I don't see this in MR so does not fix #305 |
Just to be clear, there is no (clear) reason not to merge this and after that's done I can continue and work on other parts that needs the typing fixed :) |
🤖 I have created a release *beep* *boop* --- ## [4.8.2](testcontainers-v4.8.1...testcontainers-v4.8.2) (2024-09-27) ### Bug Fixes * **core:** Reorganize core tests and improve ([#693](#693)) ([f1665f3](f1665f3)) * **core:** Typing in auth ([#691](#691)) ([66726b6](66726b6)) * **core:** Typing in config + utils ([#692](#692)) ([794a22e](794a22e)) * **keycloak:** Add support for Keycloak version >=25 ([#694](#694)) ([62bd0de](62bd0de)) * mysql typo ([#705](#705)) ([85d6078](85d6078)), closes [#689](#689) * **opensearch:** add support for admin_password in >= 2.12 ([#697](#697)) ([935693e](935693e)) * postgres use psql instead of logs ([#704](#704)) ([4365754](4365754)) * **tests:** Missing artifacts (include-hidden-files) ([#699](#699)) ([8f1165d](8f1165d)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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]>
Supports: #305 Related : #691 #692 #700 ``` poetry run mypy --config-file pyproject.toml core/testcontainers/core/version.py Success: no issues found in 1 source file ``` Old ``` 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. ``` New ``` Error Summary ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━┓ ┃ File Path ┃ Errors ┃ ┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━┩ │ 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_ryuk.py │ 2 │ │ core/tests/test_registry.py │ 1 │ │ core/tests/test_image.py │ 3 │ │ core/tests/test_compose.py │ 7 │ └───────────────────────────────────────────┴────────┘ Found 102 errors in 12 files. ```
Supports: #305 Related : #691 #692 #700 Based on #504, kudos @alexanderankin ``` poetry run mypy --config-file pyproject.toml core/testcontainers/core/docker_client.py Success: no issues found in 1 source file ``` Old ``` 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. ``` New ``` Error Summary ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━┓ ┃ File Path ┃ Errors ┃ ┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━┩ │ core/testcontainers/core/version.py │ 12 │ │ core/testcontainers/core/network.py │ 3 │ │ core/testcontainers/core/image.py │ 17 │ │ core/testcontainers/core/waiting_utils.py │ 8 │ │ core/testcontainers/core/container.py │ 19 │ │ 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 104 errors in 14 files. ```
Supports: #305
Related : #691