Custom warnings

Note

While this documentation is extracted from a submodule, as shown below, all information is available from the top level, i.e. you can (should) use:

from token_utils import disable_warnings

since this will always be guaranteed to work, even if refactoring occurs.

API extracted by Sphinx

exception token_utils.custom_warnings.SemiColonWarning[source]

Raised when a semi-colon is found separating statements on a logical line other than the first one.

__weakref__

list of weak references to the object (if defined)

exception token_utils.custom_warnings.TokenUtilsEOFWarning[source]

Raised when and EOF condition is reached.

__weakref__

list of weak references to the object (if defined)

token_utils.custom_warnings.custom_showwarning(message, category, filename, lineno, file=None, line=None)[source]

Simply show the category and message, as the rest of the potential output would not be useful.

token_utils.custom_warnings.disable_warnings()[source]

Disable all warnings arising from token_utils.