MCPcopy Create free account
hub / github.com/Python-Markdown/markdown / setConfigs

Method setConfigs

markdown/extensions/__init__.py:115–130  ·  view source on GitHub ↗

Loop through a collection of configuration options, passing each to [`setConfig`][markdown.extensions.Extension.setConfig]. Arguments: items: Collection of configuration options. Raises: KeyError: for any unknown key.

(self, items: Mapping[str, Any] | Iterable[tuple[str, Any]])

Source from the content-addressed store, hash-verified

113 self.config[key][0] = value
114
115 def setConfigs(self, items: Mapping[str, Any] | Iterable[tuple[str, Any]]) -> None:
116 """
117 Loop through a collection of configuration options, passing each to
118 [`setConfig`][markdown.extensions.Extension.setConfig].
119
120 Arguments:
121 items: Collection of configuration options.
122
123 Raises:
124 KeyError: for any unknown key.
125 """
126 if hasattr(items, 'items'):
127 # it's a dict
128 items = items.items()
129 for key, value in items:
130 self.setConfig(key, value)
131
132 def extendMarkdown(self, md: Markdown) -> None:
133 """

Callers 1

__init__Method · 0.95

Calls 1

setConfigMethod · 0.95

Tested by

no test coverage detected