Skip to content

Commit 7f8b9da

Browse files
committed
mypy fix and test fixes
- update tests to access correct property - ignore typing error
1 parent d5057c6 commit 7f8b9da

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/sentry/models/apitoken.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def _set_plaintext_token(self, token: str) -> None:
140140
"""
141141
existing_token = None
142142
try:
143-
existing_token = self.__plaintext_token
143+
existing_token = self.__plaintext_token # type: ignore[has-type]
144144
except AttributeError:
145145
self.__plaintext_token = token
146146

@@ -157,7 +157,7 @@ def _set_plaintext_refresh_token(self, token: str) -> None:
157157
"""
158158
existing_refresh_token = None
159159
try:
160-
existing_refresh_token = self.__plaintext_refresh_token
160+
existing_refresh_token = self.__plaintext_refresh_token # type: ignore[has-type]
161161
except AttributeError:
162162
self.__plaintext_refresh_token = token
163163

tests/sentry/api/test_authentication.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ def setUp(self):
185185
token_type=AuthTokenType.USER,
186186
user=self.user,
187187
)
188-
self.token = self.api_token._plaintext_token
188+
self.token = self.api_token.plaintext_token
189189

190190
def test_authenticate(self):
191191
request = HttpRequest()

0 commit comments

Comments
 (0)