Skip to content

Commit

Permalink
lint: better variable names for debug/validate ssl in config
Browse files Browse the repository at this point in the history
  • Loading branch information
davidlougheed committed Sep 13, 2024
1 parent 4518908 commit 0dd00fc
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions bento_beacon/config_files/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ def str_to_bool(value: str) -> bool:
return value.strip().lower() in ("true", "1", "t", "yes")


DEBUG = str_to_bool(os.environ.get("BENTO_DEBUG", os.environ.get("FLASK_DEBUG", "false")))
VALIDATE_SSL = str_to_bool(os.environ.get("BENTO_VALIDATE_SSL", str(not DEBUG)))
BENTO_DEBUG = str_to_bool(os.environ.get("BENTO_DEBUG", os.environ.get("FLASK_DEBUG", "false")))
BENTO_VALIDATE_SSL = str_to_bool(os.environ.get("BENTO_VALIDATE_SSL", str(not BENTO_DEBUG)))

if not VALIDATE_SSL:
if not BENTO_VALIDATE_SSL:
# Don't let urllib3 spam us with SSL validation warnings if we're operating with SSL validation off, most likely in
# a development/test context where we're using self-signed certificates.
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
Expand All @@ -37,8 +37,8 @@ class Config:

DEFAULT_PAGINATION_PAGE_SIZE = 10

BENTO_DEBUG = DEBUG
BENTO_VALIDATE_SSL = VALIDATE_SSL
BENTO_DEBUG = BENTO_DEBUG
BENTO_VALIDATE_SSL = BENTO_VALIDATE_SSL

BENTO_DOMAIN = os.environ.get("BENTOV2_DOMAIN")
BEACON_BASE_URL = os.environ.get("BEACON_BASE_URL")
Expand Down

0 comments on commit 0dd00fc

Please sign in to comment.