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