Skip to content

Commit ef78ba4

Browse files
HankyStyle余翰承
andauthored
fix: add match parameter to pytest.warns to resolve PT030 (#1828)
Co-authored-by: 余翰承 <hankyu@yuhanchengdeMacBook-Air.local>
1 parent b0af380 commit ef78ba4

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,6 @@ ignore = [
243243
"PT007", # TODO(bearomorphism): enable this rule
244244
"PT011", # TODO(bearomorphism): enable this rule
245245
"PT022", # TODO(bearomorphism): enable this rule
246-
"PT030", # TODO(bearomorphism): enable this rule
247246
]
248247
extend-safe-fixes = [
249248
"TC", # Move imports inside/outside TYPE_CHECKING blocks

tests/commands/test_bump_command.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,7 +1027,7 @@ def test_bump_with_major_version_zero_with_plugin(
10271027
def test_bump_command_version_type_deprecation(util: UtilFixture):
10281028
util.create_file_and_commit("feat: check deprecation on --version-type")
10291029

1030-
with pytest.warns(DeprecationWarning):
1030+
with pytest.warns(DeprecationWarning, match=r".*--version-type.*deprecated"):
10311031
util.run_cli(
10321032
"bump",
10331033
"--prerelease",
@@ -1044,7 +1044,7 @@ def test_bump_command_version_type_deprecation(util: UtilFixture):
10441044
def test_bump_command_version_scheme_priority_over_version_type(util: UtilFixture):
10451045
util.create_file_and_commit("feat: check deprecation on --version-type")
10461046

1047-
with pytest.warns(DeprecationWarning):
1047+
with pytest.warns(DeprecationWarning, match=r".*--version-type.*deprecated"):
10481048
util.run_cli(
10491049
"bump",
10501050
"--prerelease",

0 commit comments

Comments
 (0)