MCPcopy
hub / github.com/sphinx-doc/sphinx / _get_settings

Function _get_settings

sphinx/util/docutils.py:911–930  ·  view source on GitHub ↗
(
    *components: Component | type[Component],
    defaults: Mapping[str, Any],
    read_config_files: bool = False,
)

Source from the content-addressed store, hash-verified

909
910
911def _get_settings(
912 *components: Component | type[Component],
913 defaults: Mapping[str, Any],
914 read_config_files: bool = False,
915) -> _DocutilsSettings:
916 with warnings.catch_warnings(action='ignore', category=DeprecationWarning):
917 # DeprecationWarning: The frontend.OptionParser class will be replaced
918 # by a subclass of argparse.ArgumentParser in Docutils 0.21 or later.
919 # DeprecationWarning: The frontend.Option class will be removed
920 # in Docutils 0.21 or later.
921 option_parser = docutils.frontend.OptionParser( # pyright: ignore[reportDeprecated] # ty: ignore[deprecated]
922 components=components,
923 defaults=defaults,
924 read_config_files=read_config_files,
925 )
926 with warnings.catch_warnings(action='ignore', category=DeprecationWarning):
927 # DeprecationWarning: frontend.Values class will be removed
928 # in Docutils 2.0 or later.
929 settings = option_parser.get_default_values()
930 return settings
931
932
933class _DummyWriter(docutils.writers.Writer): # type: ignore[type-arg]

Callers 8

write_documentsMethod · 0.90
write_documentsMethod · 0.90
write_documentsMethod · 0.90
__init__Method · 0.90
prepare_writingMethod · 0.90
new_settingsFunction · 0.90
test_html_translatorFunction · 0.90
_parse_str_to_doctreeFunction · 0.85

Calls

no outgoing calls

Tested by 2

new_settingsFunction · 0.72
test_html_translatorFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…