Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions api/analyzers/csharp/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

2 changes: 1 addition & 1 deletion api/entities/entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ def resolved_symbol(self, f: Callable[[str, Node], list[Self]]):
for key, symbols in self.symbols.items():
for symbol in symbols:
for resolved_symbol in f(key, symbol.symbol):
symbol.add_resolve_symbol(resolved_symbol)
symbol.add_resolve_symbol(resolved_symbol)
2 changes: 1 addition & 1 deletion api/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -517,4 +517,4 @@ def list_commits():
'commits': commits
}

return jsonify(response), 200
return jsonify(response), 200
2 changes: 1 addition & 1 deletion api/llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,4 +264,4 @@ def ask(repo_name: str, question: str) -> str:
response = chat.send_message(question)
logging.debug(f"Response: {response}")
print(f"Response: {response['response']}")
return response['response']
return response['response']
2 changes: 1 addition & 1 deletion api/prompts.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,4 +110,4 @@

**Question:** {question}

**Your helpful answer:**"""
**Your helpful answer:**"""
20 changes: 20 additions & 0 deletions tests/test_api_trailing_newlines.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
from pathlib import Path


API_FILES_WITH_REQUIRED_TRAILING_NEWLINE = [
"api/analyzers/csharp/__init__.py",
"api/entities/entity.py",
"api/index.py",
"api/llm.py",
"api/prompts.py",
]


def test_reported_api_files_end_with_trailing_newlines():
repo_root = Path(__file__).resolve().parent.parent

for relative_path in API_FILES_WITH_REQUIRED_TRAILING_NEWLINE:
file_path = repo_root / relative_path
assert file_path.read_bytes().endswith(b"\n"), (
f"{relative_path} must end with a trailing newline"
)
Loading