]> git.ipfire.org Git - thirdparty/starlette.git/commit
Secret: add a __bool__ implementation (#1625)
authorRobert Coup <robert@coup.net.nz>
Thu, 5 May 2022 22:01:28 +0000 (23:01 +0100)
committerGitHub <noreply@github.com>
Thu, 5 May 2022 22:01:28 +0000 (00:01 +0200)
commitbeb8943eef8618ccadacd24e8b4d41c7a7456f51
tree52451dc2c9e7156c0f720b4076e5c3daf3e4746f
parentd425c84b105c9df9a29d24cef01422d699e3574f
Secret: add a __bool__ implementation (#1625)

Allows using `if settings.A_SECRET:` to check for empty/None without needing to
cast it to a str.
starlette/datastructures.py
tests/test_config.py