Skip to content

Commit

Permalink
Satisfy pyright
Browse files Browse the repository at this point in the history
  • Loading branch information
Torom committed Dec 18, 2023
1 parent 2ab3ab2 commit d4871f5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions user_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@

try:
import readline
readline_available = True
except ImportError:
readline_available = False
readline = None

COMMANDS = {
'blacklist': 'Temporarily blacklists a user. Use config for permanent blacklisting. Usage: blacklist USERNAME',
Expand Down Expand Up @@ -67,7 +66,7 @@ def main(self) -> None:
self.event_handler.join()
return

if readline_available:
if readline:
completer = Autocompleter(list(COMMANDS.keys()))
readline.set_completer(completer.complete)
readline.parse_and_bind('tab: complete')
Expand Down

0 comments on commit d4871f5

Please sign in to comment.