Issue a warning. If msg is a string, :class:`.exc.SAWarning` is used as the category.
(msg: str, code: Optional[str] = None)
| 1793 | |
| 1794 | |
| 1795 | def 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 | |
| 1808 | def warn_limited(msg: str, args: Sequence[Any]) -> None: |
no test coverage detected