You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

116 lines
2.7 KiB

  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. # Note: Better exclusion syntax coming in mypy > 0.910
  23. # https://github.com/python/mypy/pull/11329
  24. #
  25. # For now, set the (?x) flag enable "verbose" regexes
  26. # https://docs.python.org/3/library/re.html#re.X
  27. exclude = (?x)
  28. ^(
  29. |synapse/storage/databases/__init__.py
  30. |synapse/storage/databases/main/cache.py
  31. |synapse/storage/schema/
  32. |tests/server.py
  33. )$
  34. [mypy-synapse.federation.transport.client]
  35. disallow_untyped_defs = False
  36. [mypy-synapse.http.client]
  37. disallow_untyped_defs = False
  38. [mypy-synapse.http.matrixfederationclient]
  39. disallow_untyped_defs = False
  40. [mypy-synapse.metrics._reactor_metrics]
  41. disallow_untyped_defs = False
  42. # This module imports select.epoll. That exists on Linux, but doesn't on macOS.
  43. # See https://github.com/matrix-org/synapse/pull/11771.
  44. warn_unused_ignores = False
  45. [mypy-synapse.util.caches.treecache]
  46. disallow_untyped_defs = False
  47. [mypy-synapse.storage.database]
  48. disallow_untyped_defs = False
  49. [mypy-tests.util.caches.test_descriptors]
  50. disallow_untyped_defs = False
  51. ;; Dependencies without annotations
  52. ;; Before ignoring a module, check to see if type stubs are available.
  53. ;; The `typeshed` project maintains stubs here:
  54. ;; https://github.com/python/typeshed/tree/master/stubs
  55. ;; and for each package `foo` there's a corresponding `types-foo` package on PyPI,
  56. ;; which we can pull in as a dev dependency by adding to `pyproject.toml`'s
  57. ;; `[tool.poetry.dev-dependencies]` list.
  58. [mypy-authlib.*]
  59. ignore_missing_imports = True
  60. [mypy-ijson.*]
  61. ignore_missing_imports = True
  62. [mypy-lxml]
  63. ignore_missing_imports = True
  64. [mypy-msgpack]
  65. ignore_missing_imports = True
  66. # Note: WIP stubs available at
  67. # https://github.com/microsoft/python-type-stubs/tree/64934207f523ad6b611e6cfe039d85d7175d7d0d/netaddr
  68. [mypy-netaddr]
  69. ignore_missing_imports = True
  70. [mypy-parameterized.*]
  71. ignore_missing_imports = True
  72. [mypy-pymacaroons.*]
  73. ignore_missing_imports = True
  74. [mypy-pympler.*]
  75. ignore_missing_imports = True
  76. [mypy-rust_python_jaeger_reporter.*]
  77. ignore_missing_imports = True
  78. [mypy-saml2.*]
  79. ignore_missing_imports = True
  80. [mypy-service_identity.*]
  81. ignore_missing_imports = True
  82. [mypy-srvlookup.*]
  83. ignore_missing_imports = True
  84. [mypy-treq.*]
  85. ignore_missing_imports = True
  86. [mypy-incremental.*]
  87. ignore_missing_imports = True
  88. [mypy-setuptools_rust.*]
  89. ignore_missing_imports = True