Skip to content

Commit 0ceadc1

Browse files
authored
functions: remove unused setting_ module variables (talonhub#1475)
A tiny cleanup in line with the recommendation I pushed to @CodesAway's talonhub#1474. With the move to `settings.get()`, we should no longer assign settings to module-level variables, since it's no longer needed, and we don't want anyone to use them by mistake. These aren't being used, so let's just remove them. This means you can now grep for `= mod.setting(` to search for old usages, and it comes up clean on main. (To my surprise, this code was using `settings.get()` from the beginning when @wenkokke wrote it)
1 parent a3fab3e commit 0ceadc1

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

lang/tags/functions.py

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,12 @@ def code_type(m) -> str:
3232
return m.code_type
3333

3434

35-
setting_private_function_formatter = mod.setting("code_private_function_formatter", str)
36-
setting_protected_function_formatter = mod.setting(
37-
"code_protected_function_formatter", str
38-
)
39-
setting_public_function_formatter = mod.setting("code_public_function_formatter", str)
40-
setting_private_variable_formatter = mod.setting("code_private_variable_formatter", str)
41-
setting_protected_variable_formatter = mod.setting(
42-
"code_protected_variable_formatter", str
43-
)
44-
setting_public_variable_formatter = mod.setting("code_public_variable_formatter", str)
35+
mod.setting("code_private_function_formatter", str)
36+
mod.setting("code_protected_function_formatter", str)
37+
mod.setting("code_public_function_formatter", str)
38+
mod.setting("code_private_variable_formatter", str)
39+
mod.setting("code_protected_variable_formatter", str)
40+
mod.setting("code_public_variable_formatter", str)
4541

4642

4743
@mod.action_class

0 commit comments

Comments
 (0)