Skip to content

Commit

Permalink
Merge branch 'main' into pre-commit-ci-update-config
Browse files Browse the repository at this point in the history
  • Loading branch information
flying-sheep authored Nov 14, 2023
2 parents 705aefd + 18b90ea commit 78a157a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 1 addition & 3 deletions scripts/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ python = "3.11"
[tool.hatch.envs.test]
features = ["test"]
[tool.hatch.envs.test.scripts]
test = "pytest"
run = "pytest -v {args}"

[tool.pytest.ini_options]
addopts = [
Expand All @@ -59,11 +59,9 @@ addopts = [
filterwarnings = ["error"]

[tool.black]
target-version = ["py310"] # py311 not supported yet
line-length = 120

[tool.ruff]
target-version = "py311"
line-length = 120
allowed-confusables = ["", "×"]
select = [
Expand Down
8 changes: 6 additions & 2 deletions scripts/tests/test_cruft.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import json
from dataclasses import dataclass
from typing import cast
from warnings import catch_warnings, filterwarnings

import pytest
from git import Commit, Diff
Expand Down Expand Up @@ -28,8 +29,11 @@ class MockRelease:
@pytest.fixture
def con(response_mock) -> GitHubConnection:
resp = json.dumps({"login": "scverse-bot"})
with response_mock(f"GET https://api.github.com:443/users/scverse-bot -> 200 :{resp}"):
return GitHubConnection("scverse-bot")
with catch_warnings():
# https://github.com/idlesign/pytest-responsemock/issues/7
filterwarnings("ignore", category=ResourceWarning)
with response_mock(f"GET https://api.github.com:443/users/scverse-bot -> 200 :{resp}"):
return GitHubConnection("scverse-bot")


@pytest.fixture
Expand Down

0 comments on commit 78a157a

Please sign in to comment.