-
Notifications
You must be signed in to change notification settings - Fork 320
fix(core): Typing in generic + network #700
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
Merged
alexanderankin
merged 7 commits into
testcontainers:main
from
Tranquility2:mypy_update_report
May 4, 2025
Merged
fix(core): Typing in generic + network #700
alexanderankin
merged 7 commits into
testcontainers:main
from
Tranquility2:mypy_update_report
May 4, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fix missing run
bb5f120
to
d49c994
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #700 +/- ##
=======================================
Coverage ? 85.84%
=======================================
Files ? 12
Lines ? 678
Branches ? 106
=======================================
Hits ? 582
Misses ? 73
Partials ? 23 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This was referenced Sep 16, 2024
alexanderankin
approved these changes
May 4, 2025
alexanderankin
pushed a commit
that referenced
this pull request
May 4, 2025
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. ```
alexanderankin
pushed a commit
that referenced
this pull request
May 4, 2025
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. ```
alexanderankin
added a commit
that referenced
this pull request
Jun 13, 2025
Supports: #305 Related : #691 #692 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) ``` 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. ``` ``` 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]>
alexanderankin
added a commit
that referenced
this pull request
Jun 13, 2025
Supports: #305 Related : #691 #692 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) ``` 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. ``` ``` 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]>
alexanderankin
added a commit
that referenced
this pull request
Jun 13, 2025
Supports: #305 Related : #691 #692 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) ``` 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. ``` ``` 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]>
alexanderankin
pushed a commit
that referenced
this pull request
Jun 16, 2025
🤖 I have created a release *beep* *boop* --- ## [4.11.0](testcontainers-v4.10.0...testcontainers-v4.11.0) (2025-06-15) ### Features * **core:** Protocol support for container port bind and expose ([#690](#690)) ([a0d4317](a0d4317)) * DockerContainer initializer to accept its private members as kwargs ([#809](#809)) ([e7feb53](e7feb53)) ### Bug Fixes * **compose:** use provided docker command instead of default ([#785](#785)) ([0ae704a](0ae704a)) * **core:** Add kwargs to image build ([#708](#708)) ([cc02f94](cc02f94)) * **core:** change with_command type to include list of strings ([#789](#789)) ([f7c29cb](f7c29cb)) * **core:** Determine docker socket for rootless docker ([#779](#779)) ([6817582](6817582)) * **core:** Typing in docker_client ([#702](#702)) ([e8bf224](e8bf224)) * **core:** Typing in generic + network ([#700](#700)) ([2061912](2061912)) * **core:** Typing in version ([#701](#701)) ([9dc2a02](9dc2a02)) * **core:** wait in test core registry ([#812](#812)) ([b574c0e](b574c0e)) * **modules:** fix cosmosdb failure ([#827](#827)) ([dafcbed](dafcbed)) * **modules:** update chroma version ([#826](#826)) ([b7d41dd](b7d41dd)) * **rabbitmq:** correct pika pypi reference ([#817](#817)) ([e90d308](e90d308)) * **registry:** module typed ([#811](#811)) ([6b11268](6b11268)) * use connection mode override function in config ([#775](#775)) ([ab2a1ab](ab2a1ab)), closes [#774](#774) --- 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>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Supports: #305
Related : #691 #692
Overview
Old
New