summaryrefslogtreecommitdiff
path: root/coverage/tomlconfig.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2022-12-27 19:08:47 -0500
committerNed Batchelder <ned@nedbatchelder.com>2022-12-27 20:04:01 -0500
commit3823cc6d41956d0b8cfb55d6151673017a825c49 (patch)
treedee19404fd1594ed0d30fca64862e8b62cb175bf /coverage/tomlconfig.py
parent012a687b45fba8f8b3feb5aef9cd2f0c6e860d43 (diff)
downloadpython-coveragepy-git-3823cc6d41956d0b8cfb55d6151673017a825c49.tar.gz
fix: [tools.coverage] is valid for settings in a toml file. #1516
Diffstat (limited to 'coverage/tomlconfig.py')
-rw-r--r--coverage/tomlconfig.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/coverage/tomlconfig.py b/coverage/tomlconfig.py
index a7d39042..a25b3e35 100644
--- a/coverage/tomlconfig.py
+++ b/coverage/tomlconfig.py
@@ -52,7 +52,7 @@ class TomlConfigParser:
raise TomlDecodeError(str(err)) from err
return [filename]
else:
- has_toml = re.search(r"^\[tool\.coverage\.", toml_text, flags=re.MULTILINE)
+ has_toml = re.search(r"^\[tool\.coverage(\.|])", toml_text, flags=re.MULTILINE)
if self.our_file or has_toml:
# Looks like they meant to read TOML, but we can't read it.
msg = "Can't read {!r} without TOML support. Install with [toml] extra"