mypy.ini 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309
  1. [mypy]
  2. namespace_packages = True
  3. plugins = 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. local_partial_types = True
  11. no_implicit_optional = True
  12. # To find all folders that pass mypy you run:
  13. #
  14. # find synapse/* -type d -not -name __pycache__ -exec bash -c "mypy '{}' > /dev/null" \; -print
  15. files =
  16. scripts-dev/sign_json,
  17. synapse/api,
  18. synapse/appservice,
  19. synapse/config,
  20. synapse/crypto,
  21. synapse/event_auth.py,
  22. synapse/events/builder.py,
  23. synapse/events/spamcheck.py,
  24. synapse/events/third_party_rules.py,
  25. synapse/events/validator.py,
  26. synapse/federation,
  27. synapse/groups,
  28. synapse/handlers,
  29. synapse/http/additional_resource.py,
  30. synapse/http/client.py,
  31. synapse/http/federation/matrix_federation_agent.py,
  32. synapse/http/federation/srv_resolver.py,
  33. synapse/http/federation/well_known_resolver.py,
  34. synapse/http/matrixfederationclient.py,
  35. synapse/http/proxyagent.py,
  36. synapse/http/servlet.py,
  37. synapse/http/server.py,
  38. synapse/http/site.py,
  39. synapse/logging,
  40. synapse/metrics,
  41. synapse/module_api,
  42. synapse/notifier.py,
  43. synapse/push,
  44. synapse/replication,
  45. synapse/rest,
  46. synapse/server.py,
  47. synapse/server_notices,
  48. synapse/spam_checker_api,
  49. synapse/state,
  50. synapse/storage/__init__.py,
  51. synapse/storage/_base.py,
  52. synapse/storage/background_updates.py,
  53. synapse/storage/databases/main/appservice.py,
  54. synapse/storage/databases/main/client_ips.py,
  55. synapse/storage/databases/main/events.py,
  56. synapse/storage/databases/main/keys.py,
  57. synapse/storage/databases/main/pusher.py,
  58. synapse/storage/databases/main/registration.py,
  59. synapse/storage/databases/main/session.py,
  60. synapse/storage/databases/main/stream.py,
  61. synapse/storage/databases/main/ui_auth.py,
  62. synapse/storage/databases/state,
  63. synapse/storage/database.py,
  64. synapse/storage/engines,
  65. synapse/storage/keys.py,
  66. synapse/storage/persist_events.py,
  67. synapse/storage/prepare_database.py,
  68. synapse/storage/purge_events.py,
  69. synapse/storage/push_rule.py,
  70. synapse/storage/relations.py,
  71. synapse/storage/roommember.py,
  72. synapse/storage/state.py,
  73. synapse/storage/types.py,
  74. synapse/storage/util,
  75. synapse/streams,
  76. synapse/types.py,
  77. synapse/util,
  78. synapse/visibility.py,
  79. tests/replication,
  80. tests/test_event_auth.py,
  81. tests/test_utils,
  82. tests/handlers/test_password_providers.py,
  83. tests/handlers/test_room.py,
  84. tests/handlers/test_room_summary.py,
  85. tests/handlers/test_send_email.py,
  86. tests/handlers/test_sync.py,
  87. tests/handlers/test_user_directory.py,
  88. tests/rest/client/test_login.py,
  89. tests/rest/client/test_auth.py,
  90. tests/rest/media/v1/test_filepath.py,
  91. tests/rest/media/v1/test_oembed.py,
  92. tests/storage/test_state.py,
  93. tests/storage/test_user_directory.py,
  94. tests/util/test_itertools.py,
  95. tests/util/test_stream_change_cache.py
  96. [mypy-synapse.handlers.*]
  97. disallow_untyped_defs = True
  98. [mypy-synapse.push.*]
  99. disallow_untyped_defs = True
  100. [mypy-synapse.rest.*]
  101. disallow_untyped_defs = True
  102. [mypy-synapse.server_notices.*]
  103. disallow_untyped_defs = True
  104. [mypy-synapse.state.*]
  105. disallow_untyped_defs = True
  106. [mypy-synapse.storage.databases.main.client_ips]
  107. disallow_untyped_defs = True
  108. [mypy-synapse.storage.util.*]
  109. disallow_untyped_defs = True
  110. [mypy-synapse.streams.*]
  111. disallow_untyped_defs = True
  112. [mypy-synapse.util.batching_queue]
  113. disallow_untyped_defs = True
  114. [mypy-synapse.util.caches.cached_call]
  115. disallow_untyped_defs = True
  116. [mypy-synapse.util.caches.dictionary_cache]
  117. disallow_untyped_defs = True
  118. [mypy-synapse.util.caches.lrucache]
  119. disallow_untyped_defs = True
  120. [mypy-synapse.util.caches.response_cache]
  121. disallow_untyped_defs = True
  122. [mypy-synapse.util.caches.stream_change_cache]
  123. disallow_untyped_defs = True
  124. [mypy-synapse.util.caches.ttl_cache]
  125. disallow_untyped_defs = True
  126. [mypy-synapse.util.daemonize]
  127. disallow_untyped_defs = True
  128. [mypy-synapse.util.file_consumer]
  129. disallow_untyped_defs = True
  130. [mypy-synapse.util.frozenutils]
  131. disallow_untyped_defs = True
  132. [mypy-synapse.util.hash]
  133. disallow_untyped_defs = True
  134. [mypy-synapse.util.httpresourcetree]
  135. disallow_untyped_defs = True
  136. [mypy-synapse.util.iterutils]
  137. disallow_untyped_defs = True
  138. [mypy-synapse.util.linked_list]
  139. disallow_untyped_defs = True
  140. [mypy-synapse.util.logcontext]
  141. disallow_untyped_defs = True
  142. [mypy-synapse.util.logformatter]
  143. disallow_untyped_defs = True
  144. [mypy-synapse.util.macaroons]
  145. disallow_untyped_defs = True
  146. [mypy-synapse.util.manhole]
  147. disallow_untyped_defs = True
  148. [mypy-synapse.util.module_loader]
  149. disallow_untyped_defs = True
  150. [mypy-synapse.util.msisdn]
  151. disallow_untyped_defs = True
  152. [mypy-synapse.util.patch_inline_callbacks]
  153. disallow_untyped_defs = True
  154. [mypy-synapse.util.ratelimitutils]
  155. disallow_untyped_defs = True
  156. [mypy-synapse.util.retryutils]
  157. disallow_untyped_defs = True
  158. [mypy-synapse.util.rlimit]
  159. disallow_untyped_defs = True
  160. [mypy-synapse.util.stringutils]
  161. disallow_untyped_defs = True
  162. [mypy-synapse.util.templates]
  163. disallow_untyped_defs = True
  164. [mypy-synapse.util.threepids]
  165. disallow_untyped_defs = True
  166. [mypy-synapse.util.wheel_timer]
  167. disallow_untyped_defs = True
  168. [mypy-synapse.util.versionstring]
  169. disallow_untyped_defs = True
  170. [mypy-tests.handlers.test_user_directory]
  171. disallow_untyped_defs = True
  172. [mypy-tests.storage.test_user_directory]
  173. disallow_untyped_defs = True
  174. ;; Dependencies without annotations
  175. ;; Before ignoring a module, check to see if type stubs are available.
  176. ;; The `typeshed` project maintains stubs here:
  177. ;; https://github.com/python/typeshed/tree/master/stubs
  178. ;; and for each package `foo` there's a corresponding `types-foo` package on PyPI,
  179. ;; which we can pull in as a dev dependency by adding to `setup.py`'s
  180. ;; `CONDITIONAL_REQUIREMENTS["mypy"]` list.
  181. [mypy-authlib.*]
  182. ignore_missing_imports = True
  183. [mypy-bcrypt]
  184. ignore_missing_imports = True
  185. [mypy-canonicaljson]
  186. ignore_missing_imports = True
  187. [mypy-constantly]
  188. ignore_missing_imports = True
  189. [mypy-daemonize]
  190. ignore_missing_imports = True
  191. [mypy-h11]
  192. ignore_missing_imports = True
  193. [mypy-hiredis]
  194. ignore_missing_imports = True
  195. [mypy-hyperlink]
  196. ignore_missing_imports = True
  197. [mypy-ijson.*]
  198. ignore_missing_imports = True
  199. [mypy-jaeger_client.*]
  200. ignore_missing_imports = True
  201. [mypy-josepy.*]
  202. ignore_missing_imports = True
  203. [mypy-jwt.*]
  204. ignore_missing_imports = True
  205. [mypy-lxml]
  206. ignore_missing_imports = True
  207. [mypy-msgpack]
  208. ignore_missing_imports = True
  209. [mypy-nacl.*]
  210. ignore_missing_imports = True
  211. [mypy-netaddr]
  212. ignore_missing_imports = True
  213. [mypy-opentracing]
  214. ignore_missing_imports = True
  215. [mypy-phonenumbers.*]
  216. ignore_missing_imports = True
  217. [mypy-prometheus_client.*]
  218. ignore_missing_imports = True
  219. [mypy-pymacaroons.*]
  220. ignore_missing_imports = True
  221. [mypy-pympler.*]
  222. ignore_missing_imports = True
  223. [mypy-rust_python_jaeger_reporter.*]
  224. ignore_missing_imports = True
  225. [mypy-saml2.*]
  226. ignore_missing_imports = True
  227. [mypy-sentry_sdk]
  228. ignore_missing_imports = True
  229. [mypy-service_identity.*]
  230. ignore_missing_imports = True
  231. [mypy-signedjson.*]
  232. ignore_missing_imports = True
  233. [mypy-treq.*]
  234. ignore_missing_imports = True
  235. [mypy-twisted.*]
  236. ignore_missing_imports = True
  237. [mypy-zope]
  238. ignore_missing_imports = True