MCPcopy Index your code
hub / github.com/RustPython/RustPython / warning

Function warning

Lib/logging/__init__.py:2185–2193  ·  view source on GitHub ↗

Log a message with severity 'WARNING' on the root logger. If the logger has no handlers, call basicConfig() to add a console handler with a pre-defined format.

(msg, *args, **kwargs)

Source from the content-addressed store, hash-verified

2183 error(msg, *args, exc_info=exc_info, **kwargs)
2184
2185def warning(msg, *args, **kwargs):
2186 """
2187 Log a message with severity 'WARNING' on the root logger. If the logger has
2188 no handlers, call basicConfig() to add a console handler with a pre-defined
2189 format.
2190 """
2191 if len(root.handlers) == 0:
2192 basicConfig()
2193 root.warning(msg, *args, **kwargs)
2194
2195def warn(msg, *args, **kwargs):
2196 warnings.warn("The 'warn' function is deprecated, "

Callers 1

warnFunction · 0.85

Calls 3

lenFunction · 0.85
basicConfigFunction · 0.85
warningMethod · 0.45

Tested by

no test coverage detected