From 3823cc6d41956d0b8cfb55d6151673017a825c49 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Tue, 27 Dec 2022 19:08:47 -0500 Subject: fix: [tools.coverage] is valid for settings in a toml file. #1516 --- coverage/tomlconfig.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'coverage/tomlconfig.py') 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" -- cgit v1.2.1