Skip to content

Maite modules batch 7#1319

Merged
stark4n6 merged 4 commits intoabrignoni:mainfrom
Maite2003:maite-modules-batch-7
Feb 4, 2026
Merged

Maite modules batch 7#1319
stark4n6 merged 4 commits intoabrignoni:mainfrom
Maite2003:maite-modules-batch-7

Conversation

@Maite2003
Copy link
Contributor

Refactor backupSettings and BeReal to use context parameter.

Refactored bereal_preferences from an artifact into a helper function. This change addresses an initialization issue where the artifact execution order was not guaranteed, which could result in global variables being used before they were set. The new function now uses a flag to ensure its logic runs only once on the first call, guaranteeing that globals are initialized safely

Tested both with an ios15 image and everything works fine

Refactored all artifact processor functions to use a context object.
Removed the 'bereal_preferences' artifact and made it a helper function with a flag to make sure it only runs once
@JamesHabben JamesHabben added the Artifact Module Update related to an artifact module label Nov 6, 2025
@JamesHabben
Copy link
Collaborator

@Maite2003 could you address the linter errors?

@stark4n6 @abrignoni once those are done i think this looks good with me if yall are ok with this format change to the preferences extraction

************* Module BeReal
scripts/artifacts/BeReal.py:332:0: W0311: Bad indentation. Found 11 spaces, expected 12 (bad-indentation)
scripts/artifacts/BeReal.py:333:0: W0311: Bad indentation. Found 11 spaces, expected 12 (bad-indentation)
scripts/artifacts/BeReal.py:219:18: W0622: Redefining built-in 'id' (redefined-builtin)
scripts/artifacts/BeReal.py:236:11: W0718: Catching too general exception Exception (broad-exception-caught)
scripts/artifacts/BeReal.py:423:16: W0622: Redefining built-in 'id' (redefined-builtin)
scripts/artifacts/BeReal.py:441:4: W0602: Using global for 'map_id_name' but no assignment is done (global-variable-not-assigned)
scripts/artifacts/BeReal.py:445:16: W1309: Using an f-string that does not have any interpolated variables (f-string-without-interpolation)
scripts/artifacts/BeReal.py:472:11: W0718: Catching too general exception Exception (broad-exception-caught)
scripts/artifacts/BeReal.py:474:8: W0107: Unnecessary pass statement (unnecessary-pass)
scripts/artifacts/BeReal.py:462:12: W0612: Unused variable 'bereal_profile_picture' (unused-variable)
scripts/artifacts/BeReal.py:576:12: W0622: Redefining built-in 'id' (redefined-builtin)
scripts/artifacts/BeReal.py:588:15: W0718: Catching too general exception Exception (broad-exception-caught)
scripts/artifacts/BeReal.py:590:12: W0107: Unnecessary pass statement (unnecessary-pass)
scripts/artifacts/BeReal.py:675:15: W0718: Catching too general exception Exception (broad-exception-caught)
scripts/artifacts/BeReal.py:677:12: W0107: Unnecessary pass statement (unnecessary-pass)
scripts/artifacts/BeReal.py:745:12: W0622: Redefining built-in 'id' (redefined-builtin)
scripts/artifacts/BeReal.py:758:15: W0718: Catching too general exception Exception (broad-exception-caught)
scripts/artifacts/BeReal.py:748:23: W1309: Using an f-string that does not have any interpolated variables (f-string-without-interpolation)
scripts/artifacts/BeReal.py:760:12: W0107: Unnecessary pass statement (unnecessary-pass)
scripts/artifacts/BeReal.py:826:20: W0622: Redefining built-in 'id' (redefined-builtin)
scripts/artifacts/BeReal.py:884:15: W0718: Catching too general exception Exception (broad-exception-caught)
scripts/artifacts/BeReal.py:886:12: W0107: Unnecessary pass statement (unnecessary-pass)
scripts/artifacts/BeReal.py:937:16: W0622: Redefining built-in 'id' (redefined-builtin)
scripts/artifacts/BeReal.py:948:15: W0718: Catching too general exception Exception (broad-exception-caught)
scripts/artifacts/BeReal.py:950:12: W0107: Unnecessary pass statement (unnecessary-pass)
scripts/artifacts/BeReal.py:1223:15: W0718: Catching too general exception Exception (broad-exception-caught)
scripts/artifacts/BeReal.py:1225:12: W0107: Unnecessary pass statement (unnecessary-pass)
scripts/artifacts/BeReal.py:1033:20: W0612: Unused variable 'post_visibilities' (unused-variable)
scripts/artifacts/BeReal.py:1323:15: W0718: Catching too general exception Exception (broad-exception-caught)
scripts/artifacts/BeReal.py:1325:12: W0107: Unnecessary pass statement (unnecessary-pass)
scripts/artifacts/BeReal.py:1573:15: W0718: Catching too general exception Exception (broad-exception-caught)
scripts/artifacts/BeReal.py:1575:12: W0107: Unnecessary pass statement (unnecessary-pass)
scripts/artifacts/BeReal.py:1806:15: W0718: Catching too general exception Exception (broad-exception-caught)
scripts/artifacts/BeReal.py:1808:12: W0107: Unnecessary pass statement (unnecessary-pass)

@Maite2003
Copy link
Contributor Author

@JamesHabben I solved the lint error

@stark4n6
Copy link
Collaborator

stark4n6 commented Jan 8, 2026

@Maite2003 looks like one small lint error, should the global variables be outside the function?

@stark4n6 stark4n6 merged commit 3def37d into abrignoni:main Feb 4, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Artifact Module Update related to an artifact module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants