diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2021-05-01 18:18:11 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2021-05-02 07:38:19 -0400 |
commit | 4c4ba2e0bc9ec663fa3772d2b088f736345a65a1 (patch) | |
tree | a03a2672bfe64141b46243274243377d86c73bb8 /coverage/phystokens.py | |
parent | 236bc9317d208b24b418c9c167f22410613f4ade (diff) | |
download | python-coveragepy-git-4c4ba2e0bc9ec663fa3772d2b088f736345a65a1.tar.gz |
refactor: pyupgrade --py36-plus coverage/*.py
Diffstat (limited to 'coverage/phystokens.py')
-rw-r--r-- | coverage/phystokens.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/coverage/phystokens.py b/coverage/phystokens.py index 4b69c476..52c2aa06 100644 --- a/coverage/phystokens.py +++ b/coverage/phystokens.py @@ -104,7 +104,7 @@ def source_token_lines(source): mark_end = False else: if mark_start and scol > col: - line.append(("ws", u" " * (scol - col))) + line.append(("ws", " " * (scol - col))) mark_start = False tok_class = tokenize.tok_name.get(ttype, 'xx').lower()[:3] if ttype == token.NAME and keyword.iskeyword(ttext): @@ -119,7 +119,7 @@ def source_token_lines(source): yield line -class CachedTokenizer(object): +class CachedTokenizer: """A one-element cache around tokenize.generate_tokens. When reporting, coverage.py tokenizes files twice, once to find the |