From a6321c9529a5ddd1008c3568a30969c33241f63e Mon Sep 17 00:00:00 2001 From: foamyguy Date: Tue, 25 Feb 2025 19:55:27 -0600 Subject: [PATCH] update the list of shown filetypes. always show settings.toml --- create_requirement_images.py | 1 + get_imports.py | 12 ++++++++---- settings_required.py | 21 +++------------------ 3 files changed, 12 insertions(+), 22 deletions(-) diff --git a/create_requirement_images.py b/create_requirement_images.py index 2e495c3..e52fcf2 100755 --- a/create_requirement_images.py +++ b/create_requirement_images.py @@ -72,6 +72,7 @@ def asset_path(asset_name): "toml": file_icon, "bmp": file_image_icon, "png": file_image_icon, + "jpg": file_image_icon, "wav": file_music_icon, "mp3": file_music_icon, "mid": file_music_icon, diff --git a/get_imports.py b/get_imports.py index 3442554..e4de803 100644 --- a/get_imports.py +++ b/get_imports.py @@ -31,15 +31,19 @@ SHOWN_FILETYPES = [ "py", "mpy", + "txt", + "toml", "bmp", - "pcf", - "bdf", + "png", + "jpg", "wav", "mp3", "mid", - "json", - "txt", + "pcf", + "bdf", "csv", + "json", + "license", ] SHOWN_FILETYPES_EXAMPLE = [s for s in SHOWN_FILETYPES if s != "py"] diff --git a/settings_required.py b/settings_required.py index 287b8dc..b983f74 100644 --- a/settings_required.py +++ b/settings_required.py @@ -7,16 +7,6 @@ """ -LIBRARIES_THAT_REQUIRE_SETTINGS = [ - "adafruit_requests.mpy", - "adafruit_esp32spi", - "adafruit_minimqtt", - "adafruit_portalbase", - "adafruit_azureiot", - "adafruit_connection_manager.mpy", -] - - def settings_required(files_and_libs): """ Returns True if the project needs ot have a settings.toml file @@ -28,11 +18,6 @@ def settings_required(files_and_libs): # settings.toml file is already in the files so we don't need to add it again return False - # if any of the libraries that require settings.toml are included in this project - if any( - libs_that_require_settings in files_and_libs - for libs_that_require_settings in LIBRARIES_THAT_REQUIRE_SETTINGS - ): - return True - - return False + # always show settings.toml because it is created by default when + # circuitpython is loaded, and when storage.erase_filesystem() is called + return True