fix issues

This commit is contained in:
黄伟韬 2024-09-12 09:56:38 +08:00
parent 71f670bfcf
commit 56e4bab9ec
2 changed files with 2 additions and 3 deletions

View file

@ -730,8 +730,7 @@ class Editor(BaseModel):
if to_replace.strip() == "":
if file_content.strip() == "":
raise ValueError(f"The file '{file_name}' is empty. Please use the append method to add content.")
else:
raise ValueError("`to_replace` must not be empty.")
raise ValueError("`to_replace` must not be empty.")
if file_content.count(to_replace) > 1:
raise ValueError(

View file

@ -32,7 +32,7 @@ class Linter:
self.languages = dict(
python=self.py_lint,
sql=self.fake_lint, # Base_lint lacks support for full SQL syntax. Use fake_lint to bypass the validation.
sql=self.fake_lint, # base_lint lacks support for full SQL syntax. Use fake_lint to bypass the validation.
)
self.all_lint_cmd = None