Skip to content

Commit 6db0f90

Browse files
committed
Fix type error
1 parent ae90cdf commit 6db0f90

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

.github/workflows/code-quality.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
with:
1111
python-version: 3.8
1212
- run: pip install --upgrade pip
13-
- run: pip install types-setuptools "black<23" ruff "mypy<1" "jsonschema<5" pytest "returns<1" "aiohttp<4" "aiozmq<1" "django<5" "fastapi<1" "flask<3" "flask-socketio<5.3.1" "pyzmq" "sanic" "tornado<7" "uvicorn<1" "websockets<11"
13+
- run: pip install types-setuptools "black<23" ruff "mypy<2" "jsonschema<5" pytest "returns<1" "aiohttp<4" "aiozmq<1" "django<5" "fastapi<1" "flask<3" "flask-socketio<5.3.1" "pyzmq" "sanic" "tornado<7" "uvicorn<1" "websockets<11"
1414
- run: black --diff --check $(git ls-files -- '*.py' ':!:docs/*')
1515
- run: ruff $(git ls-files -- '*.py' ':!:docs/*')
1616
- run: mypy --strict $(git ls-files -- '*.py' ':!:docs/*')

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ repos:
1515
- id: ruff
1616

1717
- repo: https://github.com/pre-commit/mirrors-mypy
18-
rev: v0.971
18+
rev: v1.2.0
1919
hooks:
2020
- id: mypy
2121
args: [--strict]

tests/test_methods.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""Test methods.py"""
2-
from jsonrpcserver.result import Result
2+
from jsonrpcserver.result import Ok, Result
33
from jsonrpcserver.methods import global_methods, method
44

55
# pylint: disable=missing-function-docstring
@@ -10,7 +10,7 @@
1010
def test_decorator() -> None:
1111
@method
1212
def func() -> Result:
13-
pass
13+
return Ok()
1414

1515
assert callable(global_methods["func"])
1616

0 commit comments

Comments
 (0)