112 lines
2.4 KiB
Python
112 lines
2.4 KiB
Python
"""
|
|
This type stub file was generated by pyright.
|
|
"""
|
|
|
|
from typing import Any
|
|
|
|
"""Contains SphinxError and a few subclasses."""
|
|
class SphinxError(Exception):
|
|
"""Base class for Sphinx errors.
|
|
|
|
This is the base class for "nice" exceptions. When such an exception is
|
|
raised, Sphinx will abort the build and present the exception category and
|
|
message to the user.
|
|
|
|
Extensions are encouraged to derive from this exception for their custom
|
|
errors.
|
|
|
|
Exceptions *not* derived from :exc:`SphinxError` are treated as unexpected
|
|
and shown to the user with a part of the traceback (and the full traceback
|
|
saved in a temporary file).
|
|
|
|
.. attribute:: category
|
|
|
|
Description of the exception "category", used in converting the
|
|
exception to a string ("category: message"). Should be set accordingly
|
|
in subclasses.
|
|
"""
|
|
category = ...
|
|
|
|
|
|
class SphinxWarning(SphinxError):
|
|
"""Warning, treated as error."""
|
|
category = ...
|
|
|
|
|
|
class ApplicationError(SphinxError):
|
|
"""Application initialization error."""
|
|
category = ...
|
|
|
|
|
|
class ExtensionError(SphinxError):
|
|
"""Extension error."""
|
|
def __init__(self, message: str, orig_exc: Exception | None = ..., modname: str | None = ...) -> None:
|
|
...
|
|
|
|
@property
|
|
def category(self) -> str:
|
|
...
|
|
|
|
def __repr__(self) -> str:
|
|
...
|
|
|
|
def __str__(self) -> str:
|
|
...
|
|
|
|
|
|
|
|
class BuildEnvironmentError(SphinxError):
|
|
"""BuildEnvironment error."""
|
|
category = ...
|
|
|
|
|
|
class ConfigError(SphinxError):
|
|
"""Configuration error."""
|
|
category = ...
|
|
|
|
|
|
class DocumentError(SphinxError):
|
|
"""Document error."""
|
|
category = ...
|
|
|
|
|
|
class ThemeError(SphinxError):
|
|
"""Theme error."""
|
|
category = ...
|
|
|
|
|
|
class VersionRequirementError(SphinxError):
|
|
"""Incompatible Sphinx version error."""
|
|
category = ...
|
|
|
|
|
|
class SphinxParallelError(SphinxError):
|
|
"""Sphinx parallel build error."""
|
|
category = ...
|
|
def __init__(self, message: str, traceback: Any) -> None:
|
|
...
|
|
|
|
def __str__(self) -> str:
|
|
...
|
|
|
|
|
|
|
|
class PycodeError(Exception):
|
|
"""Pycode Python source code analyser error."""
|
|
def __str__(self) -> str:
|
|
...
|
|
|
|
|
|
|
|
class NoUri(Exception):
|
|
"""Raised by builder.get_relative_uri() or from missing-reference handlers
|
|
if there is no URI available."""
|
|
...
|
|
|
|
|
|
class FiletypeNotFoundError(Exception):
|
|
"""Raised by get_filetype() if a filename matches no source suffix."""
|
|
...
|
|
|
|
|