Page MenuHomeSoftware Heritage
Paste P1067

come on come on come on... mypy joy!
ActivePublic

Authored by ardumont on Jun 9 2021, 10:37 AM.
swh  tony  yavin4  ~  work  …  swh  swh-environment  swh-icinga-plugins   master  2✔  ERROR  %  pre-commit run --all-files
Trim Trailing Whitespace.................................................Passed
Check JSON...........................................(no files to check)Skipped
Check Yaml...............................................................Passed
flake8...................................................................Passed
codespell................................................................Passed
mypy.....................................................................Failed
- hook id: mypy
- exit code: 1
swh/icinga_plugins/cli.py:10: error: Library stubs not installed for "click" (or incompatible with Python 3.7)
swh/icinga_plugins/tests/utils.py:8: error: Library stubs not installed for "click.testing" (or incompatible with Python 3.7)
swh/icinga_plugins/tests/utils.py:8: note: Hint: "python3 -m pip install types-click"
swh/icinga_plugins/tests/utils.py:8: note: (or run "mypy --install-types" to install all missing stub packages)
swh/icinga_plugins/tests/utils.py:8: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
Found 2 errors in 2 files (checked 14 source files)
isort....................................................................Passed
black....................................................................Failed
- hook id: black
- files were modified by this hook
reformatted /home/tony/work/inria/repo/swh/swh-environment/swh-icinga-plugins/swh/icinga_plugins/tests/web_scenario.py
All done! ✨ 🍰 ✨
1 file reformatted, 15 files left unchanged.
swh  tony  yavin4  ~  work  …  swh  swh-environment  swh-icinga-plugins   master  2✔  1✎  ERROR  %  mypy swh
swh/icinga_plugins/cli.py:10: error: Library stubs not installed for "click" (or incompatible with Python 3.7)
swh/icinga_plugins/tests/utils.py:8: error: Library stubs not installed for "click.testing" (or incompatible with Python 3.7)
swh/icinga_plugins/tests/utils.py:8: note: Hint: "python3 -m pip install types-click"
swh/icinga_plugins/tests/utils.py:8: note: (or run "mypy --install-types" to install all missing stub packages)
swh/icinga_plugins/tests/utils.py:8: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
Found 2 errors in 2 files (checked 14 source files)
swh  tony  yavin4  ~  work  …  swh  swh-environment  swh-icinga-plugins   master  2✔  1✎  ERROR  %  tox -e mypy
mypy installed: aiohttp==3.7.4.post0,aiohttp-utils==3.1.1,async-timeout==3.0.1,attrs==21.2.0,attrs-strict==0.2.1,blinker==1.4,cassandra-driver==3.25.0,certifi==2021.5.30,chardet==4.0.0,click==8.0.1,Deprecated==1.2.12,Flask==2.0.1,geomet==0.2.1.post1,gunicorn==20.1.0,hypothesis==6.13.14,idna==2.10,importlib-metadata==4.5.0,iniconfig==1.1.1,iso8601==0.1.14,itsdangerous==2.0.1,Jinja2==3.0.1,MarkupSafe==2.0.1,msgpack==1.0.2,multidict==5.1.0,mypy==0.901,mypy-extensions==0.4.3,packaging==20.9,pluggy==0.13.1,psycopg2==2.8.6,py==1.10.0,pyparsing==2.4.7,pytest==6.2.4,pytest-mock==3.6.1,python-dateutil==2.8.1,python-mimeparse==1.6.0,PyYAML==5.4.1,requests==2.25.1,requests-mock==1.9.3,sentry-sdk==1.1.0,six==1.16.0,sortedcontainers==2.4.0,swh.core==0.14.1,swh.deposit==0.14.1,swh.icinga-plugins @ file:///home/tony/work/inria/repo/swh/swh-environment/swh-icinga-plugins,swh.model==2.5.1,swh.objstorage==0.2.3,swh.storage==0.30.1,tenacity==7.0.0,toml==0.10.2,typed-ast==1.4.3,typing-extensions==3.10.0.0,urllib3==1.26.5,Werkzeug==2.0.1,wrapt==1.12.1,xmltodict==0.12.0,yarl==1.6.3,zipp==3.4.1
mypy run-test-pre: PYTHONHASHSEED='1345452157'
mypy run-test: commands[0] | mypy swh
swh/icinga_plugins/tests/web_scenario.py:71: error: Argument "text" to "register_uri" of "MockerCore" has incompatible type "Callable[[Any, Any], Any]"; expected "str"
Found 1 error in 1 file (checked 14 source files)
ERROR: InvocationError for command /home/tony/work/inria/repo/swh/swh-environment/swh-icinga-plugins/.tox/mypy/bin/mypy swh (exited with code 1)
___________________________________________________________________________________________________________________ summary ___________________________________________________________________________________________________________________
ERROR: mypy: commands failed