MCPcopy
hub / github.com/pallets/werkzeug / _find_exceptions

Function _find_exceptions

src/werkzeug/exceptions.py:838–849  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

836
837
838def _find_exceptions() -> None:
839 for obj in globals().values():
840 try:
841 is_http_exception = issubclass(obj, HTTPException)
842 except TypeError:
843 is_http_exception = False
844 if not is_http_exception or obj.code is None:
845 continue
846 old_obj = default_exceptions.get(obj.code, None)
847 if old_obj is not None and issubclass(obj, old_obj):
848 continue
849 default_exceptions[obj.code] = obj
850
851
852_find_exceptions()

Callers 1

exceptions.pyFile · 0.85

Calls 2

valuesMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected