Skip to content

Commit e0939e8

Browse files
Change coverage pattern to msg = ["'] to match both quote styles without requiring closing quote
Agent-Logs-Url: https://github.com/usethis-python/usethis-python/sessions/71169fc6-2da1-43ac-8f35-588dbb29b078 Co-authored-by: nathanjmcdougall <18602289+nathanjmcdougall@users.noreply.github.com>
1 parent cd30032 commit e0939e8

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ exclude_also = [
190190
"if TYPE_CHECKING:",
191191
"raise AssertionError",
192192
"raise NotImplementedError",
193-
'msg = ".*"',
193+
"msg = [\"']",
194194
"assert_never(.*)",
195195
"class .*\\bProtocol\\):",
196196
"@(abc\\.)?abstractmethod",

src/usethis/_tool/impl/spec/coverage_py.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def config_spec(self) -> ConfigSpec:
5353
"if TYPE_CHECKING:",
5454
"raise AssertionError",
5555
"raise NotImplementedError",
56-
'msg = ".*"',
56+
"msg = [\"']",
5757
"assert_never(.*)",
5858
"class .*\\bProtocol\\):",
5959
"@(abc\\.)?abstractmethod",

tests/usethis/_core/test_core_tool.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ def test_coverage_rc_file(self, uv_init_dir: Path):
416416
if TYPE_CHECKING:
417417
raise AssertionError
418418
raise NotImplementedError
419-
msg = ".*"
419+
msg = ["']
420420
assert_never(.*)
421421
class .*\\bProtocol\\):
422422
@(abc\\.)?abstractmethod
@@ -446,7 +446,7 @@ def test_tox_ini_file(self, uv_init_dir: Path):
446446
if TYPE_CHECKING:
447447
raise AssertionError
448448
raise NotImplementedError
449-
msg = ".*"
449+
msg = ["']
450450
assert_never(.*)
451451
class .*\\bProtocol\\):
452452
@(abc\\.)?abstractmethod

0 commit comments

Comments
 (0)