mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 17:24:59 +00:00
refactor: simplify file reading in Linter.lint method
This commit is contained in:
parent
91cd9d6b51
commit
301c4265b7
1 changed files with 1 additions and 5 deletions
|
@ -76,11 +76,7 @@ class Linter:
|
|||
|
||||
def lint(self, fname, cmd=None):
|
||||
rel_fname = self.get_rel_fname(fname)
|
||||
try:
|
||||
code = Path(fname).read_text(encoding=self.encoding, errors="replace")
|
||||
except Exception as e:
|
||||
print(f"Error reading file {fname}: {str(e)}")
|
||||
return
|
||||
code = Path(fname).read_text(encoding=self.encoding, errors="replace")
|
||||
|
||||
if cmd:
|
||||
cmd = cmd.strip()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue