Skip to content

Commit

Permalink
Drop __module__ = "qtrio"
Browse files Browse the repository at this point in the history
  • Loading branch information
altendky committed May 24, 2021
1 parent cc27af0 commit 3881377
Showing 1 changed file with 1 addition and 37 deletions.
38 changes: 1 addition & 37 deletions qtrio/_exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,18 @@
class QTrioException(Exception):
"""Base exception for all QTrio exceptions."""

# https://github.com/sphinx-doc/sphinx/issues/7493
__module__ = "qtrio"



class NoOutcomesError(QTrioException):
"""Raised if you try to unwrap a :class:`qtrio.Outcomes` which has no outcomes."""

# https://github.com/sphinx-doc/sphinx/issues/7493
__module__ = "qtrio"


class EventTypeRegistrationError(QTrioException):
"""Base class for various event type registration exceptions to inherit from."""

# https://github.com/sphinx-doc/sphinx/issues/7493
__module__ = "qtrio"


class EventTypeRegistrationFailedError(EventTypeRegistrationError):
"""Raised if the attempt to register a new event type fails."""

# https://github.com/sphinx-doc/sphinx/issues/7493
__module__ = "qtrio"

def __init__(self) -> None:
super().__init__(
"Failed to register the event hint, either no available hints remain or the"
Expand All @@ -41,9 +29,6 @@ def __init__(self) -> None:
class RequestedEventTypeUnavailableError(EventTypeRegistrationError):
"""Raised if the requested event type is unavailable."""

# https://github.com/sphinx-doc/sphinx/issues/7493
__module__ = "qtrio"

def __init__(
self,
requested_type: typing.Union[int, QtCore.QEvent.Type],
Expand All @@ -59,9 +44,6 @@ class EventTypeAlreadyRegisteredError(EventTypeRegistrationError):
"""Raised when a request is made to register an event type but a type has already
been registered previously."""

# https://github.com/sphinx-doc/sphinx/issues/7493
__module__ = "qtrio"

def __init__(self) -> None:
super().__init__(
"An event type has already been registered, this must only happen once."
Expand All @@ -71,9 +53,6 @@ def __init__(self) -> None:
class ReturnCodeError(QTrioException):
"""Wraps a QApplication return code as an exception."""

# https://github.com/sphinx-doc/sphinx/issues/7493
__module__ = "qtrio"

def __eq__(self, other: object) -> bool:
if type(self) != type(other):
return False
Expand All @@ -88,35 +67,20 @@ def __eq__(self, other: object) -> bool:
class InternalError(QTrioException):
"""Raised when an internal state is inconsistent."""

# https://github.com/sphinx-doc/sphinx/issues/7493
__module__ = "qtrio"


class UserCancelledError(QTrioException):
"""Raised when a user requested cancellation of an operation."""

# https://github.com/sphinx-doc/sphinx/issues/7493
__module__ = "qtrio"


class RunnerTimedOutError(QTrioException):
"""Raised when a :class:`qtrio.Runner` times out the run."""

# https://github.com/sphinx-doc/sphinx/issues/7493
__module__ = "qtrio"


class InvalidInputError(QTrioException):
"""Raised when invalid input is provided such as via a dialog."""

# https://github.com/sphinx-doc/sphinx/issues/7493
__module__ = "qtrio"


class DialogNotActiveError(QTrioException):
"""Raised when attempting to interact with a dialog while it is not actually
available.
"""

# https://github.com/sphinx-doc/sphinx/issues/7493
__module__ = "qtrio"

0 comments on commit 3881377

Please sign in to comment.