Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.8/site-packages/libcst/_parser/parso/python/token.py: 19%

21 statements  

« prev     ^ index     » next       coverage.py v7.3.1, created at 2023-09-25 06:43 +0000

1# Copyright (c) Meta Platforms, Inc. and affiliates. 

2# 

3# This source code is licensed under the MIT license found in the 

4# LICENSE file in the root directory of this source tree. 

5 

6try: 

7 from libcst_native import token_type as native_token_type 

8 

9 TokenType = native_token_type.TokenType 

10 

11 class PythonTokenTypes: 

12 STRING: TokenType = native_token_type.STRING 

13 NUMBER: TokenType = native_token_type.NUMBER 

14 NAME: TokenType = native_token_type.NAME 

15 NEWLINE: TokenType = native_token_type.NEWLINE 

16 INDENT: TokenType = native_token_type.INDENT 

17 DEDENT: TokenType = native_token_type.DEDENT 

18 ASYNC: TokenType = native_token_type.ASYNC 

19 AWAIT: TokenType = native_token_type.AWAIT 

20 FSTRING_STRING: TokenType = native_token_type.FSTRING_STRING 

21 FSTRING_START: TokenType = native_token_type.FSTRING_START 

22 FSTRING_END: TokenType = native_token_type.FSTRING_END 

23 OP: TokenType = native_token_type.OP 

24 ENDMARKER: TokenType = native_token_type.ENDMARKER 

25 # unused dummy tokens for backwards compat with the parso tokenizer 

26 ERRORTOKEN: TokenType = native_token_type.ERRORTOKEN 

27 ERROR_DEDENT: TokenType = native_token_type.ERROR_DEDENT 

28 

29except ImportError: 

30 from libcst._parser.parso.python.py_token import ( # noqa F401 

31 PythonTokenTypes, 

32 TokenType, 

33 )