Remove unnecessary optimizations
This commit is contained in:
parent
caf5ff1080
commit
967b6a463d
@ -386,9 +386,7 @@ class Configuration:
|
|||||||
"""
|
"""
|
||||||
if plugin_schema is None:
|
if plugin_schema is None:
|
||||||
schema = self._schema
|
schema = self._schema
|
||||||
skip = 1 # skip default config
|
|
||||||
else:
|
else:
|
||||||
skip = 0
|
|
||||||
schema = self._schema.copy()
|
schema = self._schema.copy()
|
||||||
for section, options in plugin_schema.items():
|
for section, options in plugin_schema.items():
|
||||||
if (section not in schema or "type" not in schema[section] or
|
if (section not in schema or "type" not in schema[section] or
|
||||||
@ -403,9 +401,9 @@ class Configuration:
|
|||||||
raise ValueError("option already exists in %r: %r" % (
|
raise ValueError("option already exists in %r: %r" % (
|
||||||
section, option))
|
section, option))
|
||||||
schema[section][option] = value
|
schema[section][option] = value
|
||||||
copy = self.__class__(schema)
|
copy = type(self)(schema)
|
||||||
for config, source, allow_internal in self._configs[skip:]:
|
for config, source, internal in self._configs:
|
||||||
copy.update(config, source, allow_internal)
|
copy.update(config, source, internal)
|
||||||
return copy
|
return copy
|
||||||
|
|
||||||
def log_config_sources(self):
|
def log_config_sources(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user