summaryrefslogtreecommitdiff
path: root/coverage/plugin.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2023-03-22 17:12:30 -0400
committerNed Batchelder <ned@nedbatchelder.com>2023-03-22 18:34:50 -0400
commitb7be64538aa480fce641349d3053e9a84862d571 (patch)
treea5e195f650afffd026a662a628eda7b37fc5fece /coverage/plugin.py
parent5a94109e646870aef6188de25ba314f73fa1245d (diff)
downloadpython-coveragepy-git-b7be64538aa480fce641349d3053e9a84862d571.tar.gz
style: double quotes
Diffstat (limited to 'coverage/plugin.py')
-rw-r--r--coverage/plugin.py22
1 files changed, 11 insertions, 11 deletions
diff --git a/coverage/plugin.py b/coverage/plugin.py
index 5279c4d0..2c1ffada 100644
--- a/coverage/plugin.py
+++ b/coverage/plugin.py
@@ -519,29 +519,29 @@ class FileReporter(CoveragePluginBase):
Each line is a list of pairs, each pair is a token::
- [('key', 'def'), ('ws', ' '), ('nam', 'hello'), ('op', '('), ... ]
+ [("key", "def"), ("ws", " "), ("nam", "hello"), ("op", "("), ... ]
Each pair has a token class, and the token text. The token classes
are:
- * ``'com'``: a comment
- * ``'key'``: a keyword
- * ``'nam'``: a name, or identifier
- * ``'num'``: a number
- * ``'op'``: an operator
- * ``'str'``: a string literal
- * ``'ws'``: some white space
- * ``'txt'``: some other kind of text
+ * ``"com"``: a comment
+ * ``"key"``: a keyword
+ * ``"nam"``: a name, or identifier
+ * ``"num"``: a number
+ * ``"op"``: an operator
+ * ``"str"``: a string literal
+ * ``"ws"``: some white space
+ * ``"txt"``: some other kind of text
If you concatenate all the token texts, and then join them with
newlines, you should have your original source back.
The default implementation simply returns each line tagged as
- ``'txt'``.
+ ``"txt"``.
"""
for line in self.source().splitlines():
- yield [('txt', line)]
+ yield [("txt", line)]
def __eq__(self, other: Any) -> bool:
return isinstance(other, FileReporter) and self.filename == other.filename