Skip to content

Commit

Permalink
Use repr of text in Tweet.__repr__
Browse files Browse the repository at this point in the history
This avoids including inconstant newlines, rather than escaped newlines, in the string representation of the Tweet object, making it more consistent
  • Loading branch information
Harmon758 committed Feb 20, 2022
1 parent c8d5d9a commit 4e2997e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tweepy/tweet.py
Expand Up @@ -67,7 +67,7 @@ def __len__(self):
return len(self.text)

def __repr__(self):
return f"<Tweet id={self.id} text={self.text}>"
return f"<Tweet id={self.id} text={repr(self.text)}>"

def __str__(self):
return self.text
Expand Down

0 comments on commit 4e2997e

Please sign in to comment.