MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / warn

Function warn

lib/sqlalchemy/util/langhelpers.py:1795–1805  ·  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

1793
1794
1795def warn(msg: str, code: Optional[str] = None) -> None:
1796 """Issue a warning.
1797
1798 If msg is a string, :class:`.exc.SAWarning` is used as
1799 the category.
1800
1801 """
1802 if code:
1803 _warnings_warn(exc.SAWarning(msg, code=code))
1804 else:
1805 _warnings_warn(msg, exc.SAWarning)
1806
1807
1808def 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