MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / formatwarning

Function formatwarning

tools/python-3.11.9-amd64/Lib/warnings.py:15–18  ·  view source on GitHub ↗

Function to format a warning the standard way.

(message, category, filename, lineno, line=None)

Source from the content-addressed store, hash-verified

13 _showwarnmsg_impl(msg)
14
15def formatwarning(message, category, filename, lineno, line=None):
16 """Function to format a warning the standard way."""
17 msg = WarningMessage(message, category, filename, lineno, None, line)
18 return _formatwarnmsg_impl(msg)
19
20def _showwarnmsg_impl(msg):
21 file = msg.file

Callers

nothing calls this directly

Calls 2

WarningMessageClass · 0.85
_formatwarnmsg_implFunction · 0.85

Tested by

no test coverage detected