Skip to content
Snippets Groups Projects
Commit 1585d066 authored by Renaud Boyer's avatar Renaud Boyer
Browse files

packaging: move mypy config to pyproject.toml

parent 7a2569bf
No related branches found
No related tags found
1 merge request!1320packaging: Centralize python related settings in pyproject.toml
[mypy]
namespace_packages = True
warn_unused_ignores = True
explicit_package_bases = True
# ^ Needed for mypy to detect py.typed from swh packages installed
# in editable mode
# support for django magic: https://github.com/typeddjango/django-stubs
plugins = mypy_django_plugin.main, mypy_drf_plugin.main
[mypy.plugins.django-stubs]
django_settings_module = swh.web.settings.development
# 3rd party libraries without stubs (yet)
[mypy-bs4.*]
ignore_missing_imports = True
[mypy-corsheaders.*]
ignore_missing_imports = True
[mypy-django_js_reverse.*]
ignore_missing_imports = True
[mypy-django_ratelimit.*]
ignore_missing_imports = True
[mypy-htmlmin.*]
ignore_missing_imports = True
[mypy-iso8601.*]
ignore_missing_imports = True
[mypy-keycloak.*]
ignore_missing_imports = True
[mypy-magic.*]
ignore_missing_imports = True
[mypy-msgpack.*]
ignore_missing_imports = True
[mypy-prometheus_client.*]
ignore_missing_imports = True
[mypy-psycopg2.*]
ignore_missing_imports = True
[mypy-pygments.*]
ignore_missing_imports = True
[mypy-pymemcache.*]
ignore_missing_imports = True
[mypy-requests_mock.*]
ignore_missing_imports = True
[mypy-sphinx.*]
ignore_missing_imports = True
[mypy-sphinxcontrib.*]
ignore_missing_imports = True
[mypy-swh.docs.*]
ignore_missing_imports = True
# [mypy-add_your_lib_here.*]
# ignore_missing_imports = True
......@@ -84,4 +84,29 @@ filterwarnings = """
consider_namespace_packages = true
markers = """
inbound_message: used to pass a message parameter to the inbound_message fixture
"""
\ No newline at end of file
"""
[tool.django-stubs]
django_settings_module = "swh.web.settings.development"
[tool.mypy]
namespace_packages = true
warn_unused_ignores = true
explicit_package_bases = true
# ^ Needed for mypy to detect py.typed from swh packages installed
# in editable mode
plugins = [
"mypy_django_plugin.main",
"mypy_drf_plugin.main"
]
[[tool.mypy.overrides]]
module = [
"django_js_reverse.*",
"django_ratelimit.*",
"msgpack",
"pymemcache.*",
"htmlmin",
]
ignore_missing_imports = true
......@@ -14,8 +14,10 @@ swh.graph >= 5.1.1
swh.loader.git >= 0.8.0
swh-scheduler[testing] >= 2.3.0
swh.storage >= 0.1.1
types-beautifulsoup4
types-cryptography
types-docutils
types-psycopg2
types-Pygments
types-pyyaml
types-requests
types-requests
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment