Skip to content

Commit

Permalink
fix: don't use AbstractContextManager for exceptions_as_dialog (#234)
Browse files Browse the repository at this point in the history
* fix: don't use AbstractContextManager

* fix docs
  • Loading branch information
tlambert03 authored Mar 6, 2024
1 parent 16f9ef9 commit d407af2
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/superqt/utils/_errormsg_context.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from __future__ import annotations

import traceback
from contextlib import AbstractContextManager
from typing import TYPE_CHECKING, cast

from qtpy.QtCore import Qt
Expand All @@ -14,7 +13,7 @@
_DEFAULT_FLAGS = Qt.WindowType.Dialog | Qt.WindowType.MSWindowsFixedSizeDialogHint


class exceptions_as_dialog(AbstractContextManager):
class exceptions_as_dialog:
"""Context manager that shows a dialog when an exception is raised.
See examples below for common usage patterns.
Expand Down Expand Up @@ -66,8 +65,8 @@ class exceptions_as_dialog(AbstractContextManager):
exception : BaseException | None
Will hold the exception instance if an exception was raised and caught.
Examplez
-------
Examples
--------
```python
from qtpy.QtWidgets import QApplication
from superqt.utils import exceptions_as_dialog
Expand Down

0 comments on commit d407af2

Please sign in to comment.