testcontainers / testcontainers-python

Testcontainers is a Python library that providing a friendly API to run Docker container. It is designed to create runtime environment to use during your automatic tests.
https://testcontainers-python.readthedocs.io/en/latest/
Apache License 2.0
1.53k stars 280 forks source link

fix(core): Typing in config + utils #692

Closed Tranquility2 closed 1 week ago

Tranquility2 commented 3 weeks ago

Supports: https://github.com/testcontainers/testcontainers-python/issues/305 Related : #691

poetry run mypy --config-file pyproject.toml core/testcontainers/core/config.py core/testcontainers/core/utils.py
Success: no issues found in 2 source files
codecov[bot] commented 3 weeks ago

Codecov Report

Attention: Patch coverage is 70.00000% with 3 lines in your changes missing coverage. Please review.

Please upload report for BASE (main@2cf5a9f). Learn more about missing BASE report.

Files with missing lines Patch % Lines
core/testcontainers/core/utils.py 66.66% 2 Missing :warning:
core/testcontainers/core/config.py 75.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #692 +/- ## ======================================= Coverage ? 77.19% ======================================= Files ? 12 Lines ? 605 Branches ? 89 ======================================= Hits ? 467 Misses ? 112 Partials ? 26 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

Tranquility2 commented 3 weeks ago

Note: it will be best to introduce https://github.com/testcontainers/testcontainers-python/pull/693 first, rebase and align this.

CarliJoy commented 1 week ago

Hi,

it is important that the build package contains a py.typed at least in the testcontainers.core or best in the testcontainers folder.

I don't see this in MR so does not fix #305

Tranquility2 commented 1 week ago

Hi @CarliJoy #305 is a track not a single PR (in my option) this PR helps us get closer to the Goal described on #305. It never claimed to fix it the issue, just to support the effort. Can we agree it a step in the right direction?

Tranquility2 commented 1 week ago

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 :)