Skip to content

Commit

Permalink
mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
alexmojaki committed Nov 24, 2024
1 parent b72b6ce commit e672f6b
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions asttokens/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,20 @@
from abc import ABCMeta
from ast import Module, expr, AST
from functools import lru_cache
from typing import Callable, Dict, Iterable, Iterator, List, Optional, Tuple, Union, cast, Any, TYPE_CHECKING
from typing import (
Callable,
Dict,
Iterable,
Iterator,
List,
Optional,
Tuple,
Union,
cast,
Any,
TYPE_CHECKING,
Type,
)

if TYPE_CHECKING: # pragma: no cover
from .astroid_compat import NodeNG
Expand Down Expand Up @@ -184,7 +197,7 @@ def is_expr_stmt(node):



CONSTANT_CLASSES = (ast.Constant,)
CONSTANT_CLASSES: Tuple[Type, ...] = (ast.Constant,)
try:
from astroid import Const
CONSTANT_CLASSES += (Const,)
Expand Down

0 comments on commit e672f6b

Please sign in to comment.