MCPcopy
hub / github.com/Python-Markdown/markdown / getConfig

Method getConfig

markdown/extensions/__init__.py:60–74  ·  view source on GitHub ↗

Return a single configuration option value. Arguments: key: The configuration option name. default: Default value to return if key is not set. Returns: Value of stored configuration option.

(self, key: str, default: Any = '')

Source from the content-addressed store, hash-verified

58 self.setConfigs(kwargs)
59
60 def getConfig(self, key: str, default: Any = '') -> Any:
61 """
62 Return a single configuration option value.
63
64 Arguments:
65 key: The configuration option name.
66 default: Default value to return if key is not set.
67
68 Returns:
69 Value of stored configuration option.
70 """
71 if key in self.config:
72 return self.config[key][0]
73 else:
74 return default
75
76 def getConfigs(self) -> dict[str, Any]:
77 """

Callers 14

getConfigsMethod · 0.95
__init__Method · 0.80
__init__Method · 0.80
extendMarkdownMethod · 0.80
finderMethod · 0.80
get_separatorMethod · 0.80
makeFootnoteIdMethod · 0.80
makeFootnoteRefIdMethod · 0.80
makeFootnotesDivMethod · 0.80
handleMatchMethod · 0.80
reorder_footnotesMethod · 0.80
runMethod · 0.80

Calls

no outgoing calls

Tested by 2

testGetConfigMethod · 0.64
testGetConfigDefaultMethod · 0.64