FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix(core): Improving typing for common container usage scenarios by santi · Pull Request #523 · testcontainers/testcontainers-python · GitHub

fix(core): Improving typing for common container usage scenarios - #523

Merged
santi merged 2 commits into
mainfrom
feat/hot-path-type-improvements
Apr 3, 2024
Merged

fix(core): Improving typing for common container usage scenarios#523
santi merged 2 commits into
mainfrom
feat/hot-path-type-improvements

Conversation

santi commented Apr 2, 2024
edited
Loading

Copy link
Copy Markdown
Contributor

Improves type hints for type checking in a common use cases:

with MySqlContainer("mysql:8").with_env("some", "value") as mysql:
    url = mysql.get_connection_url()  # get_connection_url would previously be an unknown member here

And, also improved type hinting for the custom DockerClient's run command, where the linter no longer reports an error due to missing parameter types:

DockerClient.run("nginx")  # Previously this would report "Argument missing for parameter "image"

alexanderankin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

'spose

Copy link
Copy Markdown
Member

linking #504 and #305

santi merged commit d5b8553 into main Apr 3, 2024
santi deleted the feat/hot-path-type-improvements branch April 3, 2024 12:40
alexanderankin pushed a commit that referenced this pull request Apr 8, 2024
🤖 I have created a release *beep* *boop*
---


##
[4.3.2](testcontainers-v4.3.1...testcontainers-v4.3.2)
(2024-04-08)


### Bug Fixes

* **core:** Improve typing for common container usage scenarios
([#523](#523))
([d5b8553](d5b8553))
* **core:** make config editable to avoid monkeypatching.1
([#532](#532))
([3be6da3](3be6da3))
* **vault:** add support for HashiCorp Vault container
([#366](#366))
([1326278](1326278))

---
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>
mloesch pushed a commit to mloesch/testcontainers-python that referenced this pull request Apr 8, 2024
🤖 I have created a release *beep* *boop*
---


##
[4.3.2](testcontainers/testcontainers-python@testcontainers-v4.3.1...testcontainers-v4.3.2)
(2024-04-08)


### Bug Fixes

* **core:** Improve typing for common container usage scenarios
([testcontainers#523](testcontainers#523))
([d5b8553](testcontainers@d5b8553))
* **core:** make config editable to avoid monkeypatching.1
([testcontainers#532](testcontainers#532))
([3be6da3](testcontainers@3be6da3))
* **vault:** add support for HashiCorp Vault container
([testcontainers#366](testcontainers#366))
([1326278](testcontainers@1326278))

---
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>
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL