X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/966baaacbc24a4affa88ea5bb0b5a44b0f52fe2f..92e0f5b96500459b232a927fb26b0c990800b586:/src/blib2to3/pgen2/token.py?ds=sidebyside diff --git a/src/blib2to3/pgen2/token.py b/src/blib2to3/pgen2/token.py index 1e0dec9..117cc09 100644 --- a/src/blib2to3/pgen2/token.py +++ b/src/blib2to3/pgen2/token.py @@ -1,12 +1,8 @@ """Token constants (from "token.h").""" -import sys from typing import Dict -if sys.version_info < (3, 8): - from typing_extensions import Final -else: - from typing import Final +from typing import Final # Taken from Python (r53757) and modified to include some tokens # originally monkeypatched in by pgen2.tokenize @@ -78,7 +74,7 @@ NT_OFFSET: Final = 256 tok_name: Final[Dict[int, str]] = {} for _name, _value in list(globals().items()): - if type(_value) is type(0): + if type(_value) is int: tok_name[_value] = _name