Fixed UserSettings docstring
This commit is contained in:
parent
d14f110a80
commit
fe023c2b46
|
@ -19204,7 +19204,7 @@ class UserSettings:
|
||||||
# to access the user settings without diarectly using the UserSettings class
|
# to access the user settings without diarectly using the UserSettings class
|
||||||
_default_for_function_interface = None # type: UserSettings
|
_default_for_function_interface = None # type: UserSettings
|
||||||
|
|
||||||
def __init__(self, filename=None, path=None, silent_on_error=False, autosave=True, use_config_file=False, retain_config_comments=True, convert_bools_and_none=True):
|
def __init__(self, filename=None, path=None, silent_on_error=False, autosave=True, use_config_file=False, convert_bools_and_none=True):
|
||||||
"""
|
"""
|
||||||
User Settings
|
User Settings
|
||||||
|
|
||||||
|
@ -19218,8 +19218,8 @@ class UserSettings:
|
||||||
:type autosave: (bool)
|
:type autosave: (bool)
|
||||||
:param use_config_file: If True then the file format will be a config.ini rather than json
|
:param use_config_file: If True then the file format will be a config.ini rather than json
|
||||||
:type use_config_file: (bool)
|
:type use_config_file: (bool)
|
||||||
:param retain_config_comments: Not yet implemented
|
:param convert_bools_and_none: If True then "True", "False", "None" will be converted to the Python values True, False, None. Default is TRUE
|
||||||
:type retain_config_comments: (bool)
|
:type convert_bools_and_none: (bool)
|
||||||
"""
|
"""
|
||||||
|
|
||||||
self.path = path
|
self.path = path
|
||||||
|
@ -19230,7 +19230,7 @@ class UserSettings:
|
||||||
self.silent_on_error = silent_on_error
|
self.silent_on_error = silent_on_error
|
||||||
self.autosave = autosave
|
self.autosave = autosave
|
||||||
self.use_config_file = use_config_file
|
self.use_config_file = use_config_file
|
||||||
self.retain_config_comments = retain_config_comments
|
# self.retain_config_comments = retain_config_comments
|
||||||
self.convert_bools = convert_bools_and_none
|
self.convert_bools = convert_bools_and_none
|
||||||
if use_config_file:
|
if use_config_file:
|
||||||
self.config = configparser.ConfigParser()
|
self.config = configparser.ConfigParser()
|
||||||
|
@ -19622,8 +19622,8 @@ class UserSettings:
|
||||||
self.dict = self.section_class_dict
|
self.dict = self.section_class_dict
|
||||||
self.config_sections = self.config.sections()
|
self.config_sections = self.config.sections()
|
||||||
# self.config_dict = {section_name : dict(self.config[section_name]) for section_name in self.config.sections()}
|
# self.config_dict = {section_name : dict(self.config[section_name]) for section_name in self.config.sections()}
|
||||||
if self.retain_config_comments:
|
# if self.retain_config_comments:
|
||||||
self.config_file_contents = f.readlines()
|
# self.config_file_contents = f.readlines()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
if not self.silent_on_error:
|
if not self.silent_on_error:
|
||||||
_error_popup_with_traceback('User settings read warning', 'Error reading settings from file', self.full_filename, e)
|
_error_popup_with_traceback('User settings read warning', 'Error reading settings from file', self.full_filename, e)
|
||||||
|
|
Loading…
Reference in New Issue