Skip to content

Commit 62f0712

Browse files
committed
chore: fix mypy error
1 parent 264cad5 commit 62f0712

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/docformatter/classify.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -460,9 +460,9 @@ def is_string_variable(
460460
# TODO: The AWAIT token is removed in Python 3.13 and later. Only Python 3.9
461461
# seems to generate the AWAIT token, so we can safely remove the check for it when
462462
# support for Python 3.9 is dropped in April 2026.
463-
try:
463+
if sys.version_info <= (3, 12):
464464
_token_types = (tokenize.AWAIT, tokenize.OP)
465-
except AttributeError:
465+
else:
466466
_token_types = (tokenize.OP,)
467467

468468
if prev_token.type in _token_types and (

0 commit comments

Comments
 (0)