Skip to content

Commit 84e68c6

Browse files
committed
fix: made verbose tabcomplete init prints into debug logs
1 parent 264b609 commit 84e68c6

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

gptme/tabcomplete.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,28 @@
1+
import logging
12
import readline
23
from functools import lru_cache
34
from pathlib import Path
45

56
from .commands import CMDFIX, COMMANDS
67

8+
logger = logging.getLogger(__name__)
9+
710

811
def register_tabcomplete() -> None:
912
"""Register tab completion for readline."""
1013

1114
# set up tab completion
12-
print("Setting up tab completion")
15+
logger.debug("Setting up tab completion")
1316
readline.set_completer(_completer)
1417
readline.set_completer_delims(" ")
1518
readline.parse_and_bind("tab: complete")
1619

1720
# https://github.com/python/cpython/issues/102130#issuecomment-1439242363
1821
if "libedit" in readline.__doc__: # type: ignore
19-
print("Found libedit readline")
22+
logger.debug("Found libedit readline")
2023
readline.parse_and_bind("bind ^I rl_complete")
2124
else:
22-
print("Found gnu readline")
25+
logger.debug("Found gnu readline")
2326
readline.parse_and_bind("tab: complete")
2427

2528

0 commit comments

Comments
 (0)