From 778dbcabb02592317273aaccdbb4d95c40a83309 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Fri, 17 May 2024 14:30:58 -0700 Subject: [PATCH] aider: Remove the unused import `get_language` from `aider/linter.py`. # Aider chat conversation: USER: I ran this command: flake8 aider/linter.py And got this output: aider/linter.py:9:1: F401 'tree_sitter_languages.get_language' imported but unused ASSISTANT: Please add the file `aider/linter.py` to the chat so I can make the necessary changes. USER: I added these files to the chat: aider/linter.py ASSISTANT: To resolve the flake8 warning, we need to remove the unused import `get_language` from `aider/linter.py`. Here is the *SEARCH/REPLACE* block: aider/linter.py ```python <<<<<<< SEARCH from tree_sitter_languages import get_language, get_parser # noqa: E402 ======= from tree_sitter_languages import get_parser # noqa: E402 >>>>>>> REPLACE ``` --- aider/linter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aider/linter.py b/aider/linter.py index 9258fe350..dddc564c1 100644 --- a/aider/linter.py +++ b/aider/linter.py @@ -6,7 +6,7 @@ from grep_ast import TreeContext, filename_to_lang # tree_sitter is throwing a FutureWarning warnings.simplefilter("ignore", category=FutureWarning) -from tree_sitter_languages import get_language, get_parser # noqa: E402 +from tree_sitter_languages import get_parser # noqa: E402 def basic_lint(fname, code):