Skip to content

Commit

Permalink
enclosed types in double quotes to prevent runtime errors
Browse files Browse the repository at this point in the history
  • Loading branch information
rishsriv committed Aug 15, 2023
1 parent 48af92f commit d9753c4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions eval/eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def escape_percent(match):


# find start and end index of { } in a string. return (start, end) if found, else return (-1, -1)
def find_bracket_indices(s: str, start_index: int = 0) -> tuple[int, int]:
def find_bracket_indices(s: str, start_index: int = 0) -> "tuple[int, int]":
start = s.find("{", start_index)
end = s.find("}", start + 1)
if start == -1 or end == -1:
Expand All @@ -61,7 +61,7 @@ def find_bracket_indices(s: str, start_index: int = 0) -> tuple[int, int]:


# extrapolate all possible queries from a query with { } in it
def get_all_minimal_queries(query: str) -> list[str]:
def get_all_minimal_queries(query: str) -> "list[str]":
start, end = find_bracket_indices(query, 0)
if (start, end) == (-1, -1):
return [query]
Expand Down Expand Up @@ -206,7 +206,7 @@ def compare_query_results(
timeout: float,
question: str,
query_category: str,
) -> tuple[bool, bool]:
) -> "tuple[bool, bool]":
"""
Compares the results of two queries and returns a tuple of booleans, where the first element is
whether the queries produce exactly the same result, and the second element is whether the
Expand Down

0 comments on commit d9753c4

Please sign in to comment.