summaryrefslogtreecommitdiff
path: root/sphinx/pycode/parser.py
diff options
context:
space:
mode:
authorAdam Turner <9087854+AA-Turner@users.noreply.github.com>2023-01-02 00:01:14 +0000
committerGitHub <noreply@github.com>2023-01-02 00:01:14 +0000
commit4032070e8131f518bbb8a04e8d63c5af4df9b59d (patch)
tree47b14f58d5337448e8358029264ebcd6d1ae7351 /sphinx/pycode/parser.py
parentede68fa423107fbab74d07b307d7dcb03c00dfbd (diff)
downloadsphinx-git-4032070e8131f518bbb8a04e8d63c5af4df9b59d.tar.gz
Run pyupgrade (#11070)
Diffstat (limited to 'sphinx/pycode/parser.py')
-rw-r--r--sphinx/pycode/parser.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/sphinx/pycode/parser.py b/sphinx/pycode/parser.py
index 68a3523b3..7dd924822 100644
--- a/sphinx/pycode/parser.py
+++ b/sphinx/pycode/parser.py
@@ -118,8 +118,7 @@ class Token:
return any(self == candidate for candidate in conditions)
def __repr__(self) -> str:
- return '<Token kind=%r value=%r>' % (tokenize.tok_name[self.kind],
- self.value.strip())
+ return f'<Token kind={tokenize.tok_name[self.kind]!r} value={self.value.strip()!r}>'
class TokenProcessor: