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

Method deregister

markdown/util.py:388–400  ·  view source on GitHub ↗

Remove an item from the registry. Set `strict=False` to fail silently. Otherwise a [`ValueError`][] is raised for an unknown `name`.

(self, name: str, strict: bool = True)

Source from the content-addressed store, hash-verified

386 self._priority.append(_PriorityItem(name, priority))
387
388 def deregister(self, name: str, strict: bool = True) -> None:
389 """
390 Remove an item from the registry.
391
392 Set `strict=False` to fail silently. Otherwise a [`ValueError`][] is raised for an unknown `name`.
393 """
394 try:
395 index = self.get_index_for_name(name)
396 del self._priority[index]
397 del self._data[name]
398 except ValueError:
399 if strict:
400 raise
401
402 def _sort(self) -> None:
403 """

Callers 3

registerMethod · 0.95
testDeregisterMethod · 0.95
test_remove_processorMethod · 0.80

Calls 1

get_index_for_nameMethod · 0.95

Tested by 2

testDeregisterMethod · 0.76
test_remove_processorMethod · 0.64