(
*components: Component | type[Component],
defaults: Mapping[str, Any],
read_config_files: bool = False,
)
| 909 | |
| 910 | |
| 911 | def _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 | |
| 933 | class _DummyWriter(docutils.writers.Writer): # type: ignore[type-arg] |
no outgoing calls
searching dependent graphs…