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.51k stars 281 forks source link

fix: added types to exec & tc_properties_get_tc_host #561

Closed Dandiggas closed 3 months ago

Dandiggas commented 4 months ago

https://github.com/testcontainers/testcontainers-python/issues/557 - trying to solve this issue by adding types.

errordeveloper commented 4 months ago

@kiview could you please approve the workflows to run?

alexanderankin commented 4 months ago

We'll take a look

alexanderankin commented 3 months ago

yep so we support python 3.9 for now so cant use the pipe syntax for typing.Union - but the other type is indeed wrong so we could merge a pr that just fixes a single type, would probably prefer a PR that fixes types more comprehensively like #504 - if you want to provide feedback on that branch, that could help it along - it was only not merged because i was not confident in 100% of the choices made in there at the time.

ill leave this open in case you want to replace with from typing import Union

Dandiggas commented 3 months ago

@alexanderankin Now supports python 3.9, please review when possible

alexanderankin commented 3 months ago

thank you for the contribution! if you are interested in improving typing in this library are other types that I have started but did not feel confident enough to merge #504