mypy.ini 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. [mypy]
  2. namespace_packages = True
  3. plugins = pydantic.mypy, mypy_zope:plugin, scripts-dev/mypy_synapse_plugin.py
  4. follow_imports = normal
  5. check_untyped_defs = True
  6. show_error_codes = True
  7. show_traceback = True
  8. mypy_path = stubs
  9. warn_unreachable = True
  10. warn_unused_ignores = True
  11. local_partial_types = True
  12. no_implicit_optional = True
  13. disallow_untyped_defs = True
  14. strict_equality = True
  15. warn_redundant_casts = True
  16. files =
  17. docker/,
  18. scripts-dev/,
  19. synapse/,
  20. tests/,
  21. build_rust.py
  22. [mypy-synapse.metrics._reactor_metrics]
  23. # This module imports select.epoll. That exists on Linux, but doesn't on macOS.
  24. # See https://github.com/matrix-org/synapse/pull/11771.
  25. warn_unused_ignores = False
  26. [mypy-synapse.util.caches.treecache]
  27. disallow_untyped_defs = False
  28. [mypy-tests.util.caches.test_descriptors]
  29. disallow_untyped_defs = False
  30. ;; Dependencies without annotations
  31. ;; Before ignoring a module, check to see if type stubs are available.
  32. ;; The `typeshed` project maintains stubs here:
  33. ;; https://github.com/python/typeshed/tree/master/stubs
  34. ;; and for each package `foo` there's a corresponding `types-foo` package on PyPI,
  35. ;; which we can pull in as a dev dependency by adding to `pyproject.toml`'s
  36. ;; `[tool.poetry.dev-dependencies]` list.
  37. [mypy-authlib.*]
  38. ignore_missing_imports = True
  39. [mypy-ijson.*]
  40. ignore_missing_imports = True
  41. [mypy-lxml]
  42. ignore_missing_imports = True
  43. [mypy-msgpack]
  44. ignore_missing_imports = True
  45. [mypy-parameterized.*]
  46. ignore_missing_imports = True
  47. [mypy-pymacaroons.*]
  48. ignore_missing_imports = True
  49. [mypy-pympler.*]
  50. ignore_missing_imports = True
  51. [mypy-rust_python_jaeger_reporter.*]
  52. ignore_missing_imports = True
  53. [mypy-saml2.*]
  54. ignore_missing_imports = True
  55. [mypy-service_identity.*]
  56. ignore_missing_imports = True
  57. [mypy-srvlookup.*]
  58. ignore_missing_imports = True
  59. [mypy-treq.*]
  60. ignore_missing_imports = True
  61. [mypy-incremental.*]
  62. ignore_missing_imports = True
  63. [mypy-setuptools_rust.*]
  64. ignore_missing_imports = True