From fe50853e8afdb91670074b7de733975aaadcee0a Mon Sep 17 00:00:00 2001 From: Karol Zak Date: Wed, 16 Sep 2020 11:27:21 +0200 Subject: [PATCH] try fix load_dotenv --- pre_commit_nb/base64_to_external_storage.py | 2 +- setup.py | 2 +- tests/test_base64_to_external_storage.py | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pre_commit_nb/base64_to_external_storage.py b/pre_commit_nb/base64_to_external_storage.py index 2416068..a45aa31 100644 --- a/pre_commit_nb/base64_to_external_storage.py +++ b/pre_commit_nb/base64_to_external_storage.py @@ -98,7 +98,7 @@ def validate_env_vars( def main(argv: Optional[Sequence[str]] = None) -> int: - load_dotenv() + load_dotenv(verbose=True, override=True) az_blob_container_url = os.environ.get("AZ_BLOB_CONTAINER_URL") az_blob_container_sas_token_upload = os.environ.get("AZ_BLOB_CONTAINER_SAS_TOKEN_UPLOAD") # NOQA E501 diff --git a/setup.py b/setup.py index 118e9eb..cba0561 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ setup( name="pre_commit_nb", - version="0.2.4a1", + version="0.2.4a2", description="Set of git pre-commit hooks for Jupyter Notebooks compatible with https://pre-commit.com/ framework", # NOQA E501 long_description=long_description, long_description_content_type="text/markdown", # This is important! diff --git a/tests/test_base64_to_external_storage.py b/tests/test_base64_to_external_storage.py index 26f149e..475e3af 100644 --- a/tests/test_base64_to_external_storage.py +++ b/tests/test_base64_to_external_storage.py @@ -13,7 +13,8 @@ base64_to_blob_storage, main, check_sas_token_for_correct_permissions, validate_env_vars) -load_dotenv() # tests doesnt work locally without this line +# tests doesnt work locally without this line +load_dotenv(verbose=True, override=True) TEST1_FILE = "./tests/data/test1.png" TEST1_B64 = "iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAIAAABvFaqvAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAACMSURBVDhPpc1RCsMgFETR7n/TFuIhJOqbKj0/gb479nNr//HKzc/n7AeOJyyXJHtsMm0ksoh6WXmdLSLpZHGwiKQP9T9skF7KhzqLSNk/mUWm3WBQUZ2wHDjusVmS/KIOhAVRpOyfmSqSXhYPqSLpw/vVDdKJgyrqZUWUaSNpRbXBYOB4wvLm51OtfQGRVu87E3xWdwAAAABJRU5ErkJggg==" # NOQA 501