Skip to content

Commit ef004ad

Browse files
committed
Fixed types.
Signed-off-by: Pavel Kirilin <win10@list.ru>
1 parent 8240273 commit ef004ad

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
- name: Install deps
4646
run: poetry install
4747
- name: Run pytest check
48-
run: poetry run pytest -vv --cov="aiohttp_deps" .
48+
run: poetry run pytest -vv -n auto --cov="aiohttp_deps" .
4949
- name: Generate report
5050
run: poetry run coverage xml
5151
- name: Upload coverage reports to Codecov with GitHub Action

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ Sometimes for tests you don't want to calculate actual functions
363363
and you want to pass another functions instead.
364364

365365
To do so, you can add "dependency_overrides" or "values_overrides" to the aplication's state.
366-
These values should be dicts.
366+
These values should be dicts. The keys for these values can be found in `aiohttp_deps.keys` module.
367367

368368
Here's an example.
369369

tests/test_swagger.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from collections import deque
2-
from typing import Any, Dict, Generic, Optional, TypeVar
2+
from typing import Any, Dict, Generic, Optional, TypeVar, Union
33

44
import pytest
55
from aiohttp import web
@@ -36,7 +36,10 @@ def follow_ref(ref: str, data: Dict[str, Any]) -> Dict[str, Any]:
3636
return current_model
3737

3838

39-
def get_schema_by_ref(full_schema: Dict[str, Any], ref: str) -> Dict[str, Any] | Any:
39+
def get_schema_by_ref(
40+
full_schema: Dict[str, Any],
41+
ref: str,
42+
) -> Union[Dict[str, Any], Any]:
4043
ref_path = deque(ref.split("/"))
4144
current_schema = full_schema
4245
while ref_path:

0 commit comments

Comments
 (0)