diff options
| author | 2019-10-02 07:52:37 +0530 | |
|---|---|---|
| committer | 2019-10-02 07:52:37 +0530 | |
| commit | efc7a5146f922a0d70375355dfe84c9d7d63ff70 (patch) | |
| tree | b25310b56d008e0d5f05bc7d460a9640b69e7080 /bot/pagination.py | |
| parent | added function annotations to the check method (diff) | |
| parent | Point setup guide to site wiki (diff) | |
Merge branch 'master' into trivia_quiz
Diffstat (limited to '')
| -rw-r--r-- | bot/pagination.py | 8 | 
1 files changed, 4 insertions, 4 deletions
| diff --git a/bot/pagination.py b/bot/pagination.py index c12b6233..f1233482 100644 --- a/bot/pagination.py +++ b/bot/pagination.py @@ -24,7 +24,7 @@ class EmptyPaginatorEmbed(Exception):  class LinePaginator(Paginator):      """A class that aids in paginating code blocks for Discord messages.""" -    def __init__(self, prefix='```', suffix='```', max_size=2000, max_lines=None): +    def __init__(self, prefix: str = '```', suffix: str = '```', max_size: int = 2000, max_lines: int = None):          """          Overrides the Paginator.__init__ from inside discord.ext.commands. @@ -42,7 +42,7 @@ class LinePaginator(Paginator):          self._count = len(prefix) + 1  # prefix + newline          self._pages = [] -    def add_line(self, line='', *, empty=False): +    def add_line(self, line: str = '', *, empty: bool = False) -> None:          """          Adds a line to the current page. @@ -98,7 +98,7 @@ class LinePaginator(Paginator):          ...     ctx, embed          ... )          """ -        def event_check(reaction_: Reaction, user_: Member): +        def event_check(reaction_: Reaction, user_: Member) -> bool:              """Make sure that this reaction is what we want to operate on."""              no_restrictions = (                  # Pagination is not restricted @@ -274,7 +274,7 @@ class ImagePaginator(Paginator):      Refer to ImagePaginator.paginate for documentation on how to use.      """ -    def __init__(self, prefix="", suffix=""): +    def __init__(self, prefix: str = "", suffix: str = ""):          super().__init__(prefix, suffix)          self._current_page = [prefix]          self.images = [] | 
