Skip to content

Commit 9adcb23

Browse files
committed
Fix internal exception typing
The `add_exception_mapping` should take the exception type as an argument not initialized exception.
1 parent eb8900a commit 9adcb23

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/sdbus/dbus_exceptions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def __new__(
3838
name: str,
3939
bases: tuple[type, ...],
4040
namespace: dict[str, Any],
41-
) -> DbusErrorMeta:
41+
) -> type[Exception]:
4242

4343
dbus_error_name = namespace.get('dbus_error_name')
4444

src/sdbus/sd_bus_internals.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ def map_exception_to_dbus_error(exc: type[Exception],
256256
... # We want to be able to generate docs without module
257257

258258

259-
def add_exception_mapping(exc: Exception, /) -> None:
259+
def add_exception_mapping(exc: type[Exception], /) -> None:
260260
... # We want to be able to generate docs without module
261261

262262

0 commit comments

Comments
 (0)