We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 264cad5 commit 62f0712Copy full SHA for 62f0712
src/docformatter/classify.py
@@ -460,9 +460,9 @@ def is_string_variable(
460
# TODO: The AWAIT token is removed in Python 3.13 and later. Only Python 3.9
461
# seems to generate the AWAIT token, so we can safely remove the check for it when
462
# support for Python 3.9 is dropped in April 2026.
463
- try:
+ if sys.version_info <= (3, 12):
464
_token_types = (tokenize.AWAIT, tokenize.OP)
465
- except AttributeError:
+ else:
466
_token_types = (tokenize.OP,)
467
468
if prev_token.type in _token_types and (
0 commit comments