Skip to content

Commit

Permalink
update the list of shown filetypes. always show settings.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
FoamyGuy committed Feb 26, 2025
1 parent 2db4937 commit a6321c9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 22 deletions.
1 change: 1 addition & 0 deletions create_requirement_images.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
12 changes: 8 additions & 4 deletions get_imports.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

Expand Down
21 changes: 3 additions & 18 deletions settings_required.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

0 comments on commit a6321c9

Please sign in to comment.