mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-02 02:34:59 +00:00
do not try pexpect on windows; fix time.clock error on windows
This commit is contained in:
parent
bcb3fa1b47
commit
ce397b71e8
4 changed files with 5 additions and 23 deletions
|
@ -15,7 +15,6 @@ from prompt_toolkit.shortcuts import CompleteStyle, PromptSession
|
|||
from prompt_toolkit.styles import Style
|
||||
from pygments.lexers import MarkdownLexer, guess_lexer_for_filename
|
||||
from pygments.token import Token
|
||||
from pygments.util import ClassNotFound
|
||||
from rich.console import Console
|
||||
from rich.style import Style as RichStyle
|
||||
from rich.text import Text
|
||||
|
@ -83,7 +82,7 @@ class AutoCompleter(Completer):
|
|||
continue
|
||||
try:
|
||||
lexer = guess_lexer_for_filename(fname, content)
|
||||
except ClassNotFound:
|
||||
except Exception: # On Windows, bad ref to time.clock which is deprecated
|
||||
continue
|
||||
tokens = list(lexer.get_tokens(content))
|
||||
self.words.update(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue