Bluesky integration

* Centralize the our urlopen for consistency.
* Fix a few tests
This commit is contained in:
Oliver Falk
2025-02-07 11:34:24 +00:00
parent dc30267ff4
commit 3aaaac51f0
17 changed files with 920 additions and 91 deletions

View File

@@ -268,9 +268,7 @@ TRUSTED_DEFAULT_URLS = [
},
]
# This MUST BE THE LAST!
if os.path.isfile(os.path.join(BASE_DIR, "config_local.py")):
from config_local import * # noqa # flake8: noqa # NOQA # pragma: no cover
URL_TIMEOUT = 10
def map_legacy_config(trusted_url):
@@ -286,3 +284,11 @@ def map_legacy_config(trusted_url):
# Backward compability for legacy behavior
TRUSTED_DEFAULT_URLS = list(map(map_legacy_config, TRUSTED_DEFAULT_URLS))
# Bluesky settings
BLUESKY_IDENTIFIER = os.environ.get("BLUESKY_IDENTIFIER", None)
BLUESKY_APP_PASSWORD = os.environ.get("BLUESKY_APP_PASSWORD", None)
# This MUST BE THE LAST!
if os.path.isfile(os.path.join(BASE_DIR, "config_local.py")):
from config_local import * # noqa # flake8: noqa # NOQA # pragma: no cover