Skip to content

Commit 088fd39

Browse files
bdarnellgvanrossum
authored andcommitted
Add stdlib/3/tokenize.pyi (#151)
Mostly stubgen, with open() added by hand because stubgen somehow doesn't see it.
1 parent 2ddbf90 commit 088fd39

File tree

1 file changed

+99
-0
lines changed

1 file changed

+99
-0
lines changed

stdlib/3/tokenize.pyi

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
# Stubs for tokenize (Python 3.5)
2+
#
3+
# NOTE: This dynamically typed stub was automatically generated by stubgen.
4+
5+
from typing import Any, Union, TextIO
6+
from builtins import open as _builtin_open
7+
from token import *
8+
9+
COMMENT = ... # type: Any
10+
NL = ... # type: Any
11+
ENCODING = ... # type: Any
12+
13+
class TokenInfo:
14+
@property
15+
def exact_type(self): ...
16+
17+
class TokenError(Exception): ...
18+
class StopTokenizing(Exception): ...
19+
20+
class Untokenizer:
21+
tokens = ... # type: Any
22+
prev_row = ... # type: Any
23+
prev_col = ... # type: Any
24+
encoding = ... # type: Any
25+
def __init__(self): ...
26+
def add_whitespace(self, start): ...
27+
def untokenize(self, iterable): ...
28+
def compat(self, token, iterable): ...
29+
30+
def untokenize(iterable): ...
31+
def detect_encoding(readline): ...
32+
def tokenize(readline): ...
33+
34+
def open(filename: Union[str, bytes, int]) -> TextIO: ...
35+
36+
# Names in __all__ with no definition:
37+
# AMPER
38+
# AMPEREQUAL
39+
# ASYNC
40+
# AT
41+
# ATEQUAL
42+
# AWAIT
43+
# CIRCUMFLEX
44+
# CIRCUMFLEXEQUAL
45+
# COLON
46+
# COMMA
47+
# DEDENT
48+
# DOT
49+
# DOUBLESLASH
50+
# DOUBLESLASHEQUAL
51+
# DOUBLESTAR
52+
# DOUBLESTAREQUAL
53+
# ELLIPSIS
54+
# ENDMARKER
55+
# EQEQUAL
56+
# EQUAL
57+
# ERRORTOKEN
58+
# GREATER
59+
# GREATEREQUAL
60+
# INDENT
61+
# ISEOF
62+
# ISNONTERMINAL
63+
# ISTERMINAL
64+
# LBRACE
65+
# LEFTSHIFT
66+
# LEFTSHIFTEQUAL
67+
# LESS
68+
# LESSEQUAL
69+
# LPAR
70+
# LSQB
71+
# MINEQUAL
72+
# MINUS
73+
# NAME
74+
# NEWLINE
75+
# NOTEQUAL
76+
# NT_OFFSET
77+
# NUMBER
78+
# N_TOKENS
79+
# OP
80+
# PERCENT
81+
# PERCENTEQUAL
82+
# PLUS
83+
# PLUSEQUAL
84+
# RARROW
85+
# RBRACE
86+
# RIGHTSHIFT
87+
# RIGHTSHIFTEQUAL
88+
# RPAR
89+
# RSQB
90+
# SEMI
91+
# SLASH
92+
# SLASHEQUAL
93+
# STAR
94+
# STAREQUAL
95+
# STRING
96+
# TILDE
97+
# VBAR
98+
# VBAREQUAL
99+
# tok_name

0 commit comments

Comments
 (0)