Skip to content

Commit

Permalink
Merge pull request #18 from HumanCompatibleAI/type-conversion-fix
Browse files Browse the repository at this point in the history
Explicit type conversion for str->int in reddit engagement
  • Loading branch information
raindrift authored Apr 17, 2024
2 parents f15a4aa + 5a5e77e commit ae88eb0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/integration_test/integration_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ def test_rank_reddit(url):
r"https?://(?:[-\w.]|(?:%[\da-fA-F]{2}))+", row["text"]
)
engagements = RedditEngagements(
upvote=row["upvotes"],
downvote=row["downvotes"],
upvote=int(float(row["upvotes"])),
downvote=int(float(row["downvotes"])),
comment=0,
award=0,
)
Expand Down

0 comments on commit ae88eb0

Please sign in to comment.