Skip to content

Commit

Permalink
make format
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisiou committed Sep 18, 2024
1 parent 34cd4f5 commit 65f68e9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
18 changes: 10 additions & 8 deletions scripts/settings_scripts/parse_and_sort_settings_in_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,16 @@ def add_all_settings_to_global_list():
json_data = sort_and_read_json_data(JSON_PATH)
# store all the settings in the SettingsList
for entry in json_data:
add_verif_SET = False
if entry.get('add_verification_in_SET', True) or entry.get('add_verification_in_both_SetReset', True):
add_verif_SET = True

add_verif_RESET = False
if entry.get('add_verification_in_RESET', True) or entry.get('add_verification_in_both_SetReset', True)
add_verif_RESET = True

add_verif_SET = (
True
if entry.get('add_verification_in_SET', False) or entry.get('add_verification_in_both_SetReset', False)
else False
)
add_verif_RESET = (
True
if entry.get('add_verification_in_RESET', False) or entry.get('add_verification_in_both_SetReset', False)
else False
)
setting = Setting(
name=entry['name'],
description=entry['description'],
Expand Down
2 changes: 1 addition & 1 deletion scripts/settings_scripts/update_settings_scopes.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def generate_scope_code(file):
# generate new entries for the settings array
new_entries = []
for setting in SettingsList:
if setting.scope in ["GLOBAL", "LOCAL", "GLOBAL_LOCAL"]: # valid setting_scope values
if setting.scope in ["GLOBAL", "LOCAL", "GLOBAL_LOCAL"]: # valid setting_scope values
new_entries.append(f"DUCKDB_{setting.scope}({setting.struct_name})")
for alias in setting.aliases:
new_entries.append(f"DUCKDB_{setting.scope}_ALIAS(\"{alias}\", {setting.struct_name})")
Expand Down

0 comments on commit 65f68e9

Please sign in to comment.