Skip to content

Commit

Permalink
typing wip...
Browse files Browse the repository at this point in the history
  • Loading branch information
nycholas committed Jan 18, 2024
1 parent f1ea8a8 commit dbf1929
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pre_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ jobs:
bandit -r src/
- name: Check dependencies for known security vulnerabilities with Safety
run: |
safety check -i 52495 -i 51457
safety check
test:
name: Test
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -174,4 +174,4 @@ ignore_missing_imports = true

[tool.pytype]
inputs = ["src/flask_jsonrpc"]
python_version = 3.10
python_version = "3.11"
2 changes: 1 addition & 1 deletion requirements/ci.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pylint==3.0.3 # https://github.com/PyCQA/pylint
# Type check
# ------------------------------------------------------------------------------
mypy==1.8.0;python_version>="3.11" # https://github.com/python/mypy
pytype==2023.12.18;python_version>="3.10" and python_version<"3.12" # https://github.com/google/pytype
pytype==2024.1.5;python_version>="3.10" and python_version<"3.12" # https://github.com/google/pytype
types_setuptools==69.0.0.20240115 # https://github.com/python/typeshed
typeguard==2.13.3 # https://github.com/agronholm/typeguard

Expand Down
1 change: 0 additions & 1 deletion requirements/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,3 @@ python-coveralls==2.9.3 # https://github.com/z4r/python-coveralls
# Tools
# ------------------------------------------------------------------------------
requests==2.31.0 # https://github.com/psf/requests
py==1.11.0 # https://github.com/pytest-dev/py
2 changes: 1 addition & 1 deletion src/flask_jsonrpc/wrappers.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def _get_function(self, fn: t.Callable[..., t.Any]) -> t.Callable[..., t.Any]:
if isfunction(fn):
return fn
if ismethod(fn) and getattr(fn, '__func__', None):
return fn.__func__ # pytype: disable=attribute-error
return fn.__func__ # pytype: disable=attribute-error,bad-return-type
raise ValueError('the view function must be either a function or a method')

def get_jsonrpc_site(self) -> 'JSONRPCSite':
Expand Down
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ commands =
[testenv:pytype]
basepython=python3.11
deps =
pytype==2023.12.18
pytype==2024.1.5
commands =
pytype

Expand All @@ -47,7 +47,7 @@ deps =
bandit==1.7.6
safety==3.0.0
commands =
safety check -i 51457 -i 52495
safety check
bandit -r src/

[testenv:docs]
Expand Down

0 comments on commit dbf1929

Please sign in to comment.