mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix #6848: config.py shouldn't pop extensions from overrides
This commit is contained in:
parent
9f7c7a34db
commit
182b11e68d
1
CHANGES
1
CHANGES
@ -67,6 +67,7 @@ Bugs fixed
|
|||||||
* #6793: texinfo: Code examples broken following "sidebar"
|
* #6793: texinfo: Code examples broken following "sidebar"
|
||||||
* #6813: An orphan warning is emitted for included document on Windows. Thanks
|
* #6813: An orphan warning is emitted for included document on Windows. Thanks
|
||||||
to @drillan
|
to @drillan
|
||||||
|
* #6848: config.py shouldn't pop extensions from overrides
|
||||||
|
|
||||||
Testing
|
Testing
|
||||||
--------
|
--------
|
||||||
|
@ -177,16 +177,16 @@ class Config:
|
|||||||
else:
|
else:
|
||||||
config, overrides = args[:2]
|
config, overrides = args[:2]
|
||||||
|
|
||||||
self.overrides = overrides
|
self.overrides = dict(overrides)
|
||||||
self.values = Config.config_values.copy()
|
self.values = Config.config_values.copy()
|
||||||
self._raw_config = config
|
self._raw_config = config
|
||||||
self.setup = config.get('setup', None) # type: Callable
|
self.setup = config.get('setup', None) # type: Callable
|
||||||
|
|
||||||
if 'extensions' in overrides:
|
if 'extensions' in self.overrides:
|
||||||
if isinstance(overrides['extensions'], str):
|
if isinstance(self.overrides['extensions'], str):
|
||||||
config['extensions'] = overrides.pop('extensions').split(',')
|
config['extensions'] = self.overrides.pop('extensions').split(',')
|
||||||
else:
|
else:
|
||||||
config['extensions'] = overrides.pop('extensions')
|
config['extensions'] = self.overrides.pop('extensions')
|
||||||
self.extensions = config.get('extensions', []) # type: List[str]
|
self.extensions = config.get('extensions', []) # type: List[str]
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
Loading…
Reference in New Issue
Block a user