Skip to content

Commit

Permalink
Minor type check
Browse files Browse the repository at this point in the history
nicovank committed Jan 11, 2024
1 parent caa235d commit be4d92e
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -30,4 +30,6 @@ jobs:
run: python3 -m pytest

- name: Run mypy
run: mypy .
run: |
python3 -m mypy --strict src
python3 -m mypy test
2 changes: 1 addition & 1 deletion src/llm_utils/llm_utils.py
Original file line number Diff line number Diff line change
@@ -140,7 +140,7 @@ def read_lines(file_path: str, start_line: int, end_line: int) -> tuple[list[str
# Prevent pathological case where lines are REALLY long.
max_chars_per_line = 128

def truncate(s, l):
def truncate(s: str, l: int) -> str:
"""
Truncate the string to at most the given length, adding ellipses if truncated.
"""

0 comments on commit be4d92e

Please sign in to comment.