Skip to content

Commit

Permalink
chore(deps): upgrade ruff to 0.8.5 (#589)
Browse files Browse the repository at this point in the history
  • Loading branch information
jd authored Jan 3, 2025
1 parent c0982f4 commit 2d86c9e
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 30 deletions.
4 changes: 2 additions & 2 deletions mergify_cli/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from collections.abc import Generator
import pathlib
import subprocess
import typing
from unittest import mock

import pytest
Expand Down Expand Up @@ -52,7 +52,7 @@ def _git_repo() -> None:
@pytest.fixture
def git_mock(
tmp_path: pathlib.Path,
) -> typing.Generator[test_utils.GitMock, None, None]:
) -> Generator[test_utils.GitMock, None, None]:
git_mock_object = test_utils.GitMock()
# Top level directory is a temporary path
git_mock_object.mock("rev-parse", "--show-toplevel", output=str(tmp_path))
Expand Down
19 changes: 12 additions & 7 deletions mergify_cli/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@
from mergify_cli import console


if typing.TYPE_CHECKING:
from collections.abc import Callable
from collections.abc import Coroutine
from collections.abc import Mapping


_DEBUG = False


Expand Down Expand Up @@ -188,15 +194,14 @@ async def log_httpx_response(response: httpx.Response) -> None:
def get_http_client(
server: str,
headers: dict[str, typing.Any] | None = None,
event_hooks: typing.Mapping[str, list[typing.Callable[..., typing.Any]]]
| None = None,
event_hooks: Mapping[str, list[Callable[..., typing.Any]]] | None = None,
follow_redirects: bool = False,
) -> httpx.AsyncClient:
default_headers = {"User-Agent": f"mergify_cli/{VERSION}"}
if headers is not None:
default_headers |= headers

default_event_hooks: typing.Mapping[str, list[typing.Callable[..., typing.Any]]] = {
default_event_hooks: Mapping[str, list[Callable[..., typing.Any]]] = {
"request": [],
"response": [],
}
Expand All @@ -217,7 +222,7 @@ def get_http_client(


def get_github_http_client(github_server: str, token: str) -> httpx.AsyncClient:
event_hooks: typing.Mapping[str, list[typing.Callable[..., typing.Any]]] = {
event_hooks: Mapping[str, list[Callable[..., typing.Any]]] = {
"request": [],
"response": [check_for_status],
}
Expand All @@ -241,13 +246,13 @@ def get_github_http_client(github_server: str, token: str) -> httpx.AsyncClient:


def run_with_asyncio(
func: typing.Callable[
func: Callable[
P,
typing.Coroutine[typing.Any, typing.Any, R],
Coroutine[typing.Any, typing.Any, R],
],
) -> functools._Wrapped[
P,
typing.Coroutine[typing.Any, typing.Any, R],
Coroutine[typing.Any, typing.Any, R],
P,
R,
]:
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.5"
ruff = "0.8.5"
pytest = {version = ">=6.2.5"}
poethepoet = ">=0.21,<0.33"
pytest-asyncio = ">=0.23.2,<0.26.0"
Expand Down

0 comments on commit 2d86c9e

Please sign in to comment.