Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions ptbcontrib/roles/roleshandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ def setup_roles(application: Application) -> Roles:


_CCT = TypeVar("_CCT", bound=CallbackContext)
RT = TypeVar("RT")


class RolesHandler(BaseHandler[Update, _CCT]):
class RolesHandler(BaseHandler[Update, _CCT, RT]):
"""
A handler that acts as wrapper for existing handler classes allowing to add roles for
user access management. You must call :meth:`setup_roles` before this handler can work.
Expand All @@ -111,7 +111,7 @@ class RolesHandler(BaseHandler[Update, _CCT]):
"""

def __init__(
self, handler: BaseHandler[Update, _CCT], roles: Union[Role, InvertedRole, None]
self, handler: BaseHandler[Update, _CCT, RT], roles: Union[Role, InvertedRole, None]
) -> None:
self.handler = handler
self.roles: Union[Role, InvertedRole, None] = roles
Expand Down
Loading