Skip to content

Commit

Permalink
Update utils/generator.py
Browse files Browse the repository at this point in the history
Co-authored-by: Quentin Pradet <[email protected]>
  • Loading branch information
miguelgrinberg and pquentin authored Sep 9, 2024
1 parent 83559ab commit 8b8143d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions utils/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ def get_python_type(self, schema_type):
if schema_type["name"]["name"].endswith("RangeQuery"):
return '"wrappers.Range[Any]"', None
elif schema_type["name"]["name"].endswith("ScoreFunction"):
# When dropping Python 3.8, use `removesuffix("Function")` instead
name = schema_type["name"]["name"][:-8]
return f'"function.{name}"', None
elif schema_type["name"]["name"].endswith("DecayFunction"):
Expand Down

0 comments on commit 8b8143d

Please sign in to comment.