Skip to content

Commit

Permalink
build(deps-dev): Bump ruff from 0.8.0 to 0.8.3 (#576)
Browse files Browse the repository at this point in the history
Related to #574
  • Loading branch information
DouglasBlackwood authored Dec 13, 2024
1 parent 8992e54 commit b5ef322
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 26 deletions.
2 changes: 1 addition & 1 deletion mergify_cli/stack/changes.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ async def get_remote_changes(
responses = await asyncio.gather(
*(client.get(item["pull_request"]["url"]) for item in r.json()["items"]),
)
pulls = [typing.cast(github_types.PullRequest, r.json()) for r in responses]
pulls = [typing.cast("github_types.PullRequest", r.json()) for r in responses]

remote_changes = RemoteChanges({})
for pull in pulls:
Expand Down
4 changes: 2 additions & 2 deletions mergify_cli/stack/push.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ async def create_or_update_comments(
new_body = stack_comment.body(pull)

r = await client.get(f"/repos/{user}/{repo}/issues/{pull['number']}/comments")
comments = typing.cast(list[github_types.Comment], r.json())
comments = typing.cast("list[github_types.Comment]", r.json())
for comment in comments:
if StackComment.is_stack_comment(comment):
if comment["body"] != new_body:
Expand Down Expand Up @@ -360,7 +360,7 @@ async def create_or_update_stack( # noqa: PLR0913,PLR0917
"base": change.base_branch,
},
)
return typing.cast(github_types.PullRequest, r.json())
return typing.cast("github_types.PullRequest", r.json())

msg = f"Unhandled action: {change.action}"
raise RuntimeError(msg)
7 changes: 5 additions & 2 deletions mergify_cli/tests/stack/test_setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import pathlib
import typing

import pytest
Expand All @@ -7,11 +6,15 @@
from mergify_cli.tests import utils as test_utils


if typing.TYPE_CHECKING:
import pathlib


async def test_setup(
git_mock: test_utils.GitMock,
tmp_path: pytest.TempdirFactory,
) -> None:
hooks_dir = typing.cast(pathlib.Path, tmp_path) / ".git" / "hooks"
hooks_dir = typing.cast("pathlib.Path", tmp_path) / ".git" / "hooks"
hooks_dir.mkdir(parents=True)
git_mock.mock("rev-parse", "--git-path", "hooks", output=str(hooks_dir))
await setup.stack_setup()
Expand Down
40 changes: 20 additions & 20 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ click-default-group = "^1.2.4"
[tool.poetry.group.dev.dependencies]
mypy = {version = ">=0.930"}
mypy-extensions = "^1.0.0"
ruff = ">=0.5.1,<0.8.1"
ruff = ">=0.5.1,<0.8.4"
pytest = {version = ">=6.2.5"}
poethepoet = ">=0.21,<0.32"
pytest-asyncio = ">=0.23.2,<0.26.0"
Expand Down

0 comments on commit b5ef322

Please sign in to comment.