Merge pull request #1542 from umap-project/unsupport-leaflet-storage-settings

chore: remove support for settings starting with LEAFLET_STORAGE_
This commit is contained in:
Yohan Boniface 2024-01-29 12:47:39 +01:00 committed by GitHub
commit ab73fde85e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -34,10 +34,7 @@ if path:
for key in dir(d): for key in dir(d):
if key.isupper(): if key.isupper():
value = getattr(d, key) value = getattr(d, key)
if key.startswith("LEAFLET_STORAGE"): if key == "UMAP_CUSTOM_TEMPLATES":
# Retrocompat pre 1.0, remove me in 1.1.
globals()["UMAP" + key[15:]] = value
elif key == "UMAP_CUSTOM_TEMPLATES":
if "DIRS" in globals()["TEMPLATES"][0]: if "DIRS" in globals()["TEMPLATES"][0]:
globals()["TEMPLATES"][0]["DIRS"].insert(0, value) globals()["TEMPLATES"][0]["DIRS"].insert(0, value)
else: else: