Skip to content

Commit

Permalink
Ignore PT031 and fix new lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
CoolCat467 committed Jan 19, 2025
1 parent 047cbe0 commit b6f1d37
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/check-newsfragment.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: Check newsfragment

permissions: {}

on:
pull_request:
types: [labeled, unlabeled, opened, synchronize]
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ on:
tags:
- v*

permissions: {}

# a lot of code taken from https://github.com/pypa/cibuildwheel/blob/main/examples/github-deploy.yml
jobs:
build:
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ extend-ignore = [
"PERF203", # try-except-in-loop (not always possible to refactor)
"PT012", # multiple statements in pytest.raises block
"SIM117", # multiple-with-statements (messes up lots of context-based stuff and looks bad)
"PT031", # pytest-warns-with-multiple-statements (tests need large blocks in a lot of cases)

# conflicts with formatter (ruff recommends these be disabled)
"COM812",
Expand Down
5 changes: 4 additions & 1 deletion src/trio/_tests/test_deprecate.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,10 @@ def test_warning_class() -> None:
warn_deprecated("foo", "bar", issue=None, instead=None)

# essentially the same as the above check
with pytest.warns(DeprecationWarning):
with pytest.warns(
DeprecationWarning,
match="^foo is deprecated since Trio bar with no replacement$",
):
warn_deprecated("foo", "bar", issue=None, instead=None)

with pytest.warns(TrioDeprecationWarning):
Expand Down

0 comments on commit b6f1d37

Please sign in to comment.