Skip to content

Commit

Permalink
Fix type hints for map_exception_to_dbus_error
Browse files Browse the repository at this point in the history
  • Loading branch information
igo95862 committed Jun 13, 2022
1 parent cfe63a0 commit a03097d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/sdbus/dbus_exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
from .sd_bus_internals import (
SdBusBaseError,
add_exception_mapping,
map_exception_to_dbus_error)
map_exception_to_dbus_error,
)


class DbusErrorMeta(type):
Expand Down
3 changes: 2 additions & 1 deletion src/sdbus/sd_bus_internals.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
Optional,
Sequence,
Tuple,
Type,
Union,
)

Expand Down Expand Up @@ -243,7 +244,7 @@ def decode_object_path(prefix: str, full_path: str) -> str:
raise NotImplementedError(__STUB_ERROR)


def map_exception_to_dbus_error(exc: Exception,
def map_exception_to_dbus_error(exc: Type[Exception],
dbus_error_name: str, /) -> None:
... # We want to be able to generate docs without module

Expand Down

0 comments on commit a03097d

Please sign in to comment.