Skip to content

Commit 7ae0736

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 0baf0f4 commit 7ae0736

7 files changed

Lines changed: 16 additions & 9 deletions

File tree

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ repos:
3030
- id: check-case-conflict
3131
- id: check-merge-conflict
3232
- id: check-yaml
33-
args: [--unsafe] # Allow custom YAML tags
33+
args: [--unsafe] # Allow custom YAML tags
3434
exclude: ^tests/functional/.*/cassettes/.*\.yaml$
3535
- id: check-json
3636
- id: check-toml

CONTRIBUTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ pre-commit run --files src/diffbot_kg/models.py
4141
```
4242

4343
The pre-commit configuration includes:
44+
4445
- **Ruff**: Python linting and formatting
4546
- **Prettier**: YAML, JSON, and Markdown formatting
4647
- **yamllint**: YAML linting

src/diffbot_kg/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# -*- coding: utf-8 -*-
22

33
from diffbot_kg.clients.enhance import DiffbotEnhanceClient # noqa: F401
4-
from diffbot_kg.clients.search import DiffbotSearchClient # noqa: F401
4+
from diffbot_kg.clients.search import DiffbotSearchClient # noqa: F401

src/diffbot_kg/clients/session.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ def __init__(self) -> None:
4242
self.is_open = False
4343

4444
async def open(self) -> Self:
45-
self._session = aiohttp.ClientSession(headers=self._headers, timeout=self._timeout)
45+
self._session = aiohttp.ClientSession(
46+
headers=self._headers, timeout=self._timeout
47+
)
4648
self._limiter = aiolimiter.AsyncLimiter(max_rate=5, time_period=1)
4749

4850
self.is_open = True

tests/functional/clients/test_enhance_client.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,6 @@ async def test_bulkjob_coverage_report(self, request, token: Secret):
174174
if report_id is None:
175175
pytest.fail("Enhance bulk job coverage report ID not found in cache")
176176

177-
178177
TIMEOUT = 60
179178
BACKOFF_FACTOR = 1.5
180179
backoff = 1
@@ -198,7 +197,6 @@ async def test_bulkjob_coverage_report(self, request, token: Secret):
198197
assert response.status == 200
199198
assert len(response.content.strip().split("\n")) == 4
200199

201-
202200
@pytest.mark.asyncio
203201
async def test_bulkjob_stop(self, request, token: Secret):
204202
# ARRANGE

tests/unit/clients/test_session.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ def _make_error_info(status):
2626
)
2727

2828

29-
def _make_response(status=200, content_type="application/json", json_data=None, headers=None):
29+
def _make_response(
30+
status=200, content_type="application/json", json_data=None, headers=None
31+
):
3032
"""Create a mock aiohttp response."""
3133
resp = MagicMock()
3234
resp.status = status

tests/unit/models/test_response.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from unittest.mock import AsyncMock, PropertyMock
1+
from unittest.mock import AsyncMock
22

33
import pytest
44
from multidict import CIMultiDict, CIMultiDictProxy
@@ -19,7 +19,9 @@ def _mock_headers(extra=None):
1919
return CIMultiDictProxy(CIMultiDict(extra or {}))
2020

2121

22-
def _mock_aiohttp_response(content_type, json_data=None, text_data="", status=200, headers=None):
22+
def _mock_aiohttp_response(
23+
content_type, json_data=None, text_data="", status=200, headers=None
24+
):
2325
resp = AsyncMock()
2426
resp.status = status
2527
resp.content_type = content_type
@@ -127,7 +129,9 @@ def test_job_id(self):
127129
assert resp.jobId == "job-456"
128130

129131
def test_complete_true(self):
130-
content = {"content": {"job_id": "job-456", "status": "COMPLETE", "reports": []}}
132+
content = {
133+
"content": {"job_id": "job-456", "status": "COMPLETE", "reports": []}
134+
}
131135
resp = DiffbotBulkJobStatusResponse(200, _mock_headers(), content)
132136

133137
assert resp.complete is True

0 commit comments

Comments
 (0)