SCP32: Wrong setting method
What it does
Reports setting that are being read or updated with the wrong
Settings method based on the setting type.
Why is this bad?
Settingsprovides different methods to read settings based on their type, e.g.getbool()orgetint().Settings can be set outside Python code, e.g. on the command line, in which case their raw value is a string. If you do not use the right method to read the setting, you may end up with the wrong type of value, which can lead to bugs that are hard to track down.
Settingsalso provides methods to edit settings that are only meant to work on settings of a given type, such asadd_to_list(), to work on lists, orreplace_in_component_priority_dict(), to work on component priority dictionaries.
Example
settings.get("LOG_ENABLED")
Instead use:
settings.getbool("LOG_ENABLED")