MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / warn

Function warn

lib/sqlalchemy/util/langhelpers.py:1885–1895  ·  view source on GitHub ↗

Issue a warning. If msg is a string, :class:`.exc.SAWarning` is used as the category.

(msg: str, code: Optional[str] = None)

Source from the content-addressed store, hash-verified

1883
1884
1885def warn(msg: str, code: Optional[str] = None) -> None:
1886 """Issue a warning.
1887
1888 If msg is a string, :class:`.exc.SAWarning` is used as
1889 the category.
1890
1891 """
1892 if code:
1893 _warnings_warn(exc.SAWarning(msg, code=code))
1894 else:
1895 _warnings_warn(msg, exc.SAWarning)
1896
1897
1898def warn_limited(msg: str, args: Sequence[Any]) -> None:

Callers 6

configureMethod · 0.85
__set__Method · 0.85
__delete__Method · 0.85
__get__Method · 0.85
configureMethod · 0.85
warn_exceptionFunction · 0.85

Calls 1

_warnings_warnFunction · 0.85

Tested by

no test coverage detected