Skip to content

Commit

Permalink
fix B904 (#2828)
Browse files Browse the repository at this point in the history
* fix B904

* fix ruff flag --format -> --output-format
  • Loading branch information
jakkdl committed Oct 23, 2023
1 parent 01638f8 commit a0c480a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ if ! ruff check .; then
echo "* ruff found issues." >> "$GITHUB_STEP_SUMMARY"
EXIT_STATUS=1
if $ON_GITHUB_CI; then
ruff check --format github --diff .
ruff check --output-format github --diff .
else
ruff check --diff .
fi
Expand Down
4 changes: 2 additions & 2 deletions trio/_threads.py
Original file line number Diff line number Diff line change
Expand Up @@ -409,10 +409,10 @@ def from_thread_check_cancelled() -> None:
"""
try:
raise_cancel = PARENT_TASK_DATA.cancel_register[0]
except AttributeError:
except AttributeError as exc:
raise RuntimeError(
"this thread wasn't created by Trio, can't check for cancellation"
)
) from exc
if raise_cancel is not None:
raise_cancel()

Expand Down

0 comments on commit a0c480a

Please sign in to comment.