mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 00:35:00 +00:00
fix: update ESLint check and test expectations
This commit is contained in:
parent
edd9b44ad3
commit
d8027030b0
2 changed files with 4 additions and 1 deletions
|
@ -43,6 +43,9 @@ class Linter:
|
||||||
self.languages["typescript"] = f'"{eslint_file}" --format unix'
|
self.languages["typescript"] = f'"{eslint_file}" --format unix'
|
||||||
return
|
return
|
||||||
|
|
||||||
|
# If no ESLint is found, set typescript to None
|
||||||
|
self.languages["typescript"] = None
|
||||||
|
|
||||||
def set_linter(self, lang, cmd):
|
def set_linter(self, lang, cmd):
|
||||||
if lang:
|
if lang:
|
||||||
self.languages[lang] = cmd
|
self.languages[lang] = cmd
|
||||||
|
|
|
@ -37,7 +37,7 @@ class TestLinter(unittest.TestCase):
|
||||||
|
|
||||||
def test_get_rel_fname(self):
|
def test_get_rel_fname(self):
|
||||||
self.assertEqual(self.linter.get_rel_fname("/test/root/file.py"), "file.py")
|
self.assertEqual(self.linter.get_rel_fname("/test/root/file.py"), "file.py")
|
||||||
self.assertEqual(self.linter.get_rel_fname("/other/path/file.py"), "/other/path/file.py")
|
self.assertEqual(self.linter.get_rel_fname("/other/path/file.py"), "../../other/path/file.py")
|
||||||
|
|
||||||
@patch("subprocess.Popen")
|
@patch("subprocess.Popen")
|
||||||
def test_run_cmd(self, mock_popen):
|
def test_run_cmd(self, mock_popen):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue