Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Dec 24, 2024
1 parent b3af12a commit 378a04e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sweagent/mcp/features.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def lint_code(self, code: str) -> list[str]:
errors.append(f"Syntax error at line {e.lineno}: {e.msg}")

# Indentation consistency check
lines = code.split('\n')
lines = code.split("\n")
for i, line in enumerate(lines, 1):
if not line.strip(): # Skip empty lines
continue
Expand Down Expand Up @@ -73,10 +73,10 @@ def view_file(self, path: str, start: int = 0, end: int | None = None) -> str:
ValueError: If start/end are invalid
"""
if not Path(path).exists():
msg = "File not found: {}".format(path)
msg = f"File not found: {path}"
raise FileNotFoundError(msg)
if not Path(path).is_file():
msg = "Not a regular file: {}".format(path)
msg = f"Not a regular file: {path}"
raise ValueError(msg)
if start < 0:
raise ValueError("Start line cannot be negative")
Expand Down

0 comments on commit 378a04e

Please sign in to comment.