third_party.pylibs.pylint.src/pylint/testutils/tokenize_str.py
Marc Mueller 21290866a2
Fix copyright links (#4647)
* Fix link in license header
* Update link to astroid bump_changelog
2021-07-01 12:47:58 +02:00

10 lines
281 B
Python

# Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
# For details: https://github.com/PyCQA/pylint/blob/main/LICENSE
import tokenize
from io import StringIO
def _tokenize_str(code):
return list(tokenize.generate_tokens(StringIO(code).readline))