Skip to content

Commit b59323f

Browse files
authored
fix: revise malformed __str__(self) function (#593)
1 parent e150d34 commit b59323f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

twilio/jwt/access_token/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def to_payload(self):
1515
raise NotImplementedError('Grant must implement to_payload.')
1616

1717
def __str__(self):
18-
'<{} {}>'.format(self.__class__.__name__, self.to_payload())
18+
return '<{} {}>'.format(self.__class__.__name__, self.to_payload())
1919

2020

2121
class AccessToken(Jwt):
@@ -69,4 +69,4 @@ def _generate_payload(self):
6969
return payload
7070

7171
def __str__(self):
72-
return '<AccessToken {}>'.format(self.to_jwt())
72+
return '<{} {}>'.format(self.__class__.__name__, self.to_jwt())

0 commit comments

Comments
 (0)