blob: 2b3c5f2c1745c9069b7c1c056da1a35936a2240f (
plain)
1
2
3
4
5
6
7
8
9
|
# Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
# For details: https://github.com/PyCQA/pylint/blob/master/COPYING
import tokenize
from io import StringIO
def _tokenize_str(code):
return list(tokenize.generate_tokens(StringIO(code).readline))
|