mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-02 18:54:59 +00:00
Refactored the Linter class to use a dynamic command for Python linting and added a placeholder function for finding filenames and line numbers in text.
This commit is contained in:
parent
bc06d8623c
commit
ef286f0de6
1 changed files with 9 additions and 3 deletions
|
@ -21,9 +21,10 @@ class Linter:
|
||||||
py_cmd = f"flake8 --select={fatal} --show-source" # noqa: F841
|
py_cmd = f"flake8 --select={fatal} --show-source" # noqa: F841
|
||||||
|
|
||||||
self.languages = dict(
|
self.languages = dict(
|
||||||
python=self.py_lint,
|
#python=self.py_lint,
|
||||||
#python="/Users/gauthier/Projects/aider/tmp.sh"
|
#python="/Users/gauthier/Projects/aider/tmp.sh",
|
||||||
#python="flake8 --show-source"
|
#python="flake8 --show-source",
|
||||||
|
python=py_cmd,
|
||||||
)
|
)
|
||||||
|
|
||||||
def set_linter(self, lang, cmd):
|
def set_linter(self, lang, cmd):
|
||||||
|
@ -161,6 +162,11 @@ def traverse_tree(node):
|
||||||
|
|
||||||
return errors
|
return errors
|
||||||
|
|
||||||
|
def find_filenames_and_linenums(text, fnames):
|
||||||
|
# TODO:
|
||||||
|
# search text for all occurrances of <filename>:\d+ and make a list of them
|
||||||
|
# where <filename> is one of the filenames in the list `fnames`
|
||||||
|
pass
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue