strawberry-graphql 0.224.2__tar.gz → 0.225.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (247) hide show
  1. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/PKG-INFO +1 -1
  2. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/pyproject.toml +18 -4
  3. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/aiohttp/handlers/graphql_transport_ws_handler.py +1 -1
  4. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/aiohttp/handlers/graphql_ws_handler.py +1 -1
  5. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/aiohttp/views.py +2 -2
  6. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/annotation.py +1 -1
  7. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/arguments.py +1 -1
  8. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/asgi/__init__.py +1 -1
  9. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/asgi/handlers/graphql_transport_ws_handler.py +1 -1
  10. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/asgi/handlers/graphql_ws_handler.py +1 -1
  11. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/asgi/test/client.py +1 -1
  12. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/auto.py +5 -5
  13. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/chalice/views.py +2 -2
  14. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/channels/handlers/base.py +1 -1
  15. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/channels/handlers/graphql_transport_ws_handler.py +1 -1
  16. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/channels/handlers/graphql_ws_handler.py +1 -1
  17. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/channels/handlers/http_handler.py +2 -2
  18. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/channels/handlers/ws_handler.py +1 -1
  19. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/channels/router.py +1 -1
  20. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/channels/testing.py +1 -1
  21. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/codegen/query_codegen.py +2 -2
  22. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/custom_scalar.py +2 -2
  23. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/django/__init__.py +3 -1
  24. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/django/context.py +1 -1
  25. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/django/views.py +3 -3
  26. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/exceptions/__init__.py +12 -12
  27. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/exceptions/conflicting_arguments.py +1 -1
  28. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/exceptions/duplicated_type_name.py +1 -1
  29. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/exceptions/handler.py +1 -1
  30. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/exceptions/invalid_argument_type.py +1 -1
  31. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/exceptions/missing_arguments_annotations.py +5 -1
  32. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/exceptions/missing_field_annotation.py +1 -1
  33. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/exceptions/missing_return_annotation.py +5 -1
  34. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/exceptions/not_a_strawberry_enum.py +1 -1
  35. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/exceptions/object_is_not_a_class.py +1 -1
  36. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/exceptions/object_is_not_an_enum.py +1 -1
  37. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/exceptions/permission_fail_silently_requires_optional.py +1 -1
  38. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/exceptions/private_strawberry_field.py +1 -1
  39. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/exceptions/scalar_already_registered.py +1 -1
  40. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/exceptions/unresolved_field_type.py +1 -1
  41. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/experimental/pydantic/_compat.py +1 -1
  42. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/experimental/pydantic/conversion_types.py +1 -1
  43. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/experimental/pydantic/exceptions.py +9 -4
  44. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/ext/mypy_plugin.py +1 -1
  45. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/extensions/__init__.py +2 -1
  46. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/extensions/add_validation_rules.py +1 -1
  47. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/extensions/base_extension.py +1 -1
  48. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/extensions/context.py +10 -8
  49. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/extensions/disable_validation.py +1 -1
  50. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/extensions/mask_errors.py +1 -1
  51. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/extensions/max_aliases.py +2 -2
  52. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/extensions/max_tokens.py +1 -1
  53. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/extensions/parser_cache.py +1 -1
  54. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/extensions/query_depth_limiter.py +2 -2
  55. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/extensions/runner.py +1 -1
  56. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/extensions/tracing/__init__.py +2 -2
  57. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/extensions/tracing/apollo.py +1 -1
  58. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/extensions/tracing/datadog.py +2 -2
  59. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/extensions/tracing/opentelemetry.py +1 -1
  60. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/extensions/tracing/sentry.py +2 -2
  61. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/extensions/validation_cache.py +1 -1
  62. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/fastapi/router.py +47 -5
  63. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/federation/schema.py +1 -1
  64. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/federation/schema_directives.py +1 -1
  65. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/field.py +2 -2
  66. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/flask/views.py +3 -3
  67. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/http/exceptions.py +1 -1
  68. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/lazy_type.py +16 -3
  69. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/litestar/controller.py +2 -2
  70. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/litestar/handlers/graphql_transport_ws_handler.py +1 -1
  71. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/litestar/handlers/graphql_ws_handler.py +1 -1
  72. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/object_type.py +3 -3
  73. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/permission.py +1 -1
  74. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/quart/views.py +2 -2
  75. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/relay/exceptions.py +3 -3
  76. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/relay/types.py +2 -2
  77. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/sanic/views.py +2 -2
  78. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/schema/config.py +1 -1
  79. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/schema/exceptions.py +1 -1
  80. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/schema/schema.py +1 -1
  81. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/schema/schema_converter.py +7 -2
  82. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/schema_codegen/__init__.py +2 -2
  83. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/starlite/controller.py +6 -6
  84. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/starlite/handlers/graphql_transport_ws_handler.py +1 -1
  85. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/starlite/handlers/graphql_ws_handler.py +1 -1
  86. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/subscriptions/protocols/graphql_transport_ws/handlers.py +14 -4
  87. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/subscriptions/protocols/graphql_ws/handlers.py +1 -1
  88. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/test/client.py +6 -2
  89. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/type.py +3 -3
  90. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/types/execution.py +1 -1
  91. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/types/fields/resolver.py +3 -3
  92. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/types/types.py +1 -1
  93. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/union.py +2 -2
  94. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/unset.py +2 -2
  95. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/LICENSE +0 -0
  96. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/README.md +0 -0
  97. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/__init__.py +0 -0
  98. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/__main__.py +0 -0
  99. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/aiohttp/__init__.py +0 -0
  100. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/aiohttp/handlers/__init__.py +0 -0
  101. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/aiohttp/test/__init__.py +0 -0
  102. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/aiohttp/test/client.py +0 -0
  103. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/asgi/handlers/__init__.py +0 -0
  104. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/asgi/test/__init__.py +0 -0
  105. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/chalice/__init__.py +0 -0
  106. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/channels/__init__.py +0 -0
  107. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/cli/__init__.py +0 -0
  108. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/cli/app.py +0 -0
  109. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/cli/commands/__init__.py +0 -0
  110. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/cli/commands/codegen.py +0 -0
  111. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/cli/commands/export_schema.py +0 -0
  112. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/cli/commands/schema_codegen.py +0 -0
  113. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/cli/commands/server.py +0 -0
  114. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/cli/commands/upgrade/__init__.py +0 -0
  115. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/cli/commands/upgrade/_fake_progress.py +0 -0
  116. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/cli/commands/upgrade/_run_codemod.py +0 -0
  117. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/cli/constants.py +0 -0
  118. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/cli/debug_server.py +0 -0
  119. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/cli/utils/__init__.py +0 -0
  120. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/cli/utils/load_schema.py +0 -0
  121. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/codegen/__init__.py +0 -0
  122. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/codegen/exceptions.py +0 -0
  123. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/codegen/plugins/__init__.py +0 -0
  124. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/codegen/plugins/print_operation.py +0 -0
  125. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/codegen/plugins/python.py +0 -0
  126. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/codegen/plugins/typescript.py +0 -0
  127. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/codegen/types.py +0 -0
  128. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/codemods/__init__.py +0 -0
  129. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/codemods/annotated_unions.py +0 -0
  130. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/dataloader.py +0 -0
  131. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/directive.py +0 -0
  132. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/django/apps.py +0 -0
  133. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/django/test/__init__.py +0 -0
  134. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/django/test/client.py +0 -0
  135. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/enum.py +0 -0
  136. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/exceptions/exception.py +0 -0
  137. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/exceptions/exception_source.py +0 -0
  138. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/exceptions/invalid_union_type.py +0 -0
  139. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/exceptions/syntax.py +0 -0
  140. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/exceptions/utils/__init__.py +0 -0
  141. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/exceptions/utils/source_finder.py +0 -0
  142. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/experimental/__init__.py +0 -0
  143. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/experimental/pydantic/__init__.py +0 -0
  144. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/experimental/pydantic/conversion.py +0 -0
  145. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/experimental/pydantic/error_type.py +0 -0
  146. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/experimental/pydantic/fields.py +0 -0
  147. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/experimental/pydantic/object_type.py +0 -0
  148. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/experimental/pydantic/utils.py +0 -0
  149. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/ext/LICENSE +0 -0
  150. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/ext/__init__.py +0 -0
  151. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/ext/dataclasses/LICENSE +0 -0
  152. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/ext/dataclasses/__init__.py +0 -0
  153. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/ext/dataclasses/dataclasses.py +0 -0
  154. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/extensions/directives.py +0 -0
  155. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/extensions/field_extension.py +0 -0
  156. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/extensions/pyinstrument.py +0 -0
  157. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/extensions/tracing/utils.py +0 -0
  158. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/extensions/utils.py +0 -0
  159. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/fastapi/__init__.py +0 -0
  160. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/fastapi/context.py +0 -0
  161. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/fastapi/handlers/__init__.py +0 -0
  162. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/fastapi/handlers/graphql_transport_ws_handler.py +0 -0
  163. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/fastapi/handlers/graphql_ws_handler.py +0 -0
  164. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/federation/__init__.py +0 -0
  165. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/federation/argument.py +0 -0
  166. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/federation/enum.py +0 -0
  167. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/federation/field.py +0 -0
  168. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/federation/mutation.py +0 -0
  169. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/federation/object_type.py +0 -0
  170. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/federation/scalar.py +0 -0
  171. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/federation/schema_directive.py +0 -0
  172. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/federation/types.py +0 -0
  173. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/federation/union.py +0 -0
  174. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/field_extensions/__init__.py +0 -0
  175. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/field_extensions/input_mutation.py +0 -0
  176. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/file_uploads/__init__.py +0 -0
  177. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/file_uploads/scalars.py +0 -0
  178. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/file_uploads/utils.py +0 -0
  179. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/flask/__init__.py +0 -0
  180. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/http/__init__.py +0 -0
  181. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/http/async_base_view.py +0 -0
  182. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/http/base.py +0 -0
  183. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/http/ides.py +0 -0
  184. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/http/sync_base_view.py +0 -0
  185. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/http/temporal_response.py +0 -0
  186. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/http/types.py +0 -0
  187. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/http/typevars.py +0 -0
  188. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/litestar/__init__.py +0 -0
  189. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/mutation.py +0 -0
  190. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/parent.py +0 -0
  191. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/printer/__init__.py +0 -0
  192. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/printer/ast_from_value.py +0 -0
  193. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/printer/printer.py +0 -0
  194. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/private.py +0 -0
  195. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/py.typed +0 -0
  196. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/quart/__init__.py +0 -0
  197. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/relay/__init__.py +0 -0
  198. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/relay/fields.py +0 -0
  199. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/relay/utils.py +0 -0
  200. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/resolvers.py +0 -0
  201. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/sanic/__init__.py +0 -0
  202. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/sanic/context.py +0 -0
  203. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/sanic/utils.py +0 -0
  204. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/scalars.py +0 -0
  205. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/schema/__init__.py +0 -0
  206. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/schema/base.py +0 -0
  207. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/schema/compat.py +0 -0
  208. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/schema/execute.py +0 -0
  209. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/schema/name_converter.py +0 -0
  210. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/schema/types/__init__.py +0 -0
  211. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/schema/types/base_scalars.py +0 -0
  212. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/schema/types/concrete_type.py +0 -0
  213. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/schema/types/scalar.py +0 -0
  214. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/schema_directive.py +0 -0
  215. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/starlite/__init__.py +0 -0
  216. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/static/apollo-sandbox.html +0 -0
  217. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/static/graphiql.html +0 -0
  218. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/static/pathfinder.html +0 -0
  219. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/subscriptions/__init__.py +0 -0
  220. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/subscriptions/protocols/__init__.py +0 -0
  221. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/subscriptions/protocols/graphql_transport_ws/__init__.py +0 -0
  222. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/subscriptions/protocols/graphql_transport_ws/types.py +0 -0
  223. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/subscriptions/protocols/graphql_ws/__init__.py +0 -0
  224. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/subscriptions/protocols/graphql_ws/types.py +0 -0
  225. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/test/__init__.py +0 -0
  226. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/tools/__init__.py +0 -0
  227. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/tools/create_type.py +0 -0
  228. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/tools/merge_types.py +0 -0
  229. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/types/__init__.py +0 -0
  230. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/types/fields/__init__.py +0 -0
  231. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/types/graphql.py +0 -0
  232. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/types/info.py +0 -0
  233. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/types/nodes.py +0 -0
  234. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/types/type_resolver.py +0 -0
  235. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/utils/__init__.py +0 -0
  236. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/utils/aio.py +0 -0
  237. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/utils/await_maybe.py +0 -0
  238. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/utils/dataclasses.py +0 -0
  239. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/utils/debug.py +0 -0
  240. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/utils/deprecations.py +0 -0
  241. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/utils/graphql_lexer.py +0 -0
  242. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/utils/importer.py +0 -0
  243. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/utils/inspect.py +0 -0
  244. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/utils/logging.py +0 -0
  245. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/utils/operation.py +0 -0
  246. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/utils/str_converters.py +0 -0
  247. {strawberry_graphql-0.224.2 → strawberry_graphql-0.225.0}/strawberry/utils/typing.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: strawberry-graphql
3
- Version: 0.224.2
3
+ Version: 0.225.0
4
4
  Summary: A library for creating GraphQL APIs
5
5
  Home-page: https://strawberry.rocks/
6
6
  License: MIT
@@ -1,7 +1,7 @@
1
1
  [tool.poetry]
2
2
  name = "strawberry-graphql"
3
3
  packages = [ { include = "strawberry" } ]
4
- version = "0.224.2"
4
+ version = "0.225.0"
5
5
  description = "A library for creating GraphQL APIs"
6
6
  authors = ["Patrick Arminio <patrick.arminio@gmail.com>"]
7
7
  license = "MIT"
@@ -102,6 +102,7 @@ pytest-mypy-plugins = ">=1.10,<4.0"
102
102
  poetry-plugin-export = "^1.6.0"
103
103
  # another bug in poetry
104
104
  urllib3 = "<2"
105
+ ruff = "^0.3.7"
105
106
 
106
107
  [tool.poetry.group.integrations]
107
108
  optional = true
@@ -239,8 +240,6 @@ ignore = [
239
240
  # definitely enable these, maybe not in tests
240
241
  "ANN102",
241
242
  "ANN202",
242
- "ANN204",
243
- "ANN205",
244
243
  "ANN401",
245
244
  "PGH003",
246
245
  "PGH004",
@@ -355,7 +354,22 @@ ignore = [
355
354
 
356
355
  [tool.ruff.lint.per-file-ignores]
357
356
  "strawberry/schema/types/concrete_type.py" = ["TCH002"]
358
- "tests/*" = ["RSE102", "SLF001", "TCH001", "TCH002", "TCH003", "ANN001", "ANN201", "PLW0603", "PLC1901", "S603", "S607", "B018"]
357
+ "tests/*" = [
358
+ "RSE102",
359
+ "SLF001",
360
+ "TCH001",
361
+ "TCH002",
362
+ "TCH003",
363
+ "ANN001",
364
+ "ANN201",
365
+ "ANN202",
366
+ "ANN204",
367
+ "PLW0603",
368
+ "PLC1901",
369
+ "S603",
370
+ "S607",
371
+ "B018",
372
+ ]
359
373
  "strawberry/extensions/tracing/__init__.py" = ["TCH004"]
360
374
  "tests/http/clients/__init__.py" = ["F401"]
361
375
 
@@ -23,7 +23,7 @@ class GraphQLTransportWSHandler(BaseGraphQLTransportWSHandler):
23
23
  get_context: Callable[..., Dict[str, Any]],
24
24
  get_root_value: Any,
25
25
  request: web.Request,
26
- ):
26
+ ) -> None:
27
27
  super().__init__(schema, debug, connection_init_wait_timeout)
28
28
  self._get_context = get_context
29
29
  self._get_root_value = get_root_value
@@ -22,7 +22,7 @@ class GraphQLWSHandler(BaseGraphQLWSHandler):
22
22
  get_context: Callable,
23
23
  get_root_value: Callable,
24
24
  request: web.Request,
25
- ):
25
+ ) -> None:
26
26
  super().__init__(schema, debug, keep_alive, keep_alive_interval)
27
27
  self._get_context = get_context
28
28
  self._get_root_value = get_root_value
@@ -35,7 +35,7 @@ if TYPE_CHECKING:
35
35
 
36
36
 
37
37
  class AioHTTPRequestAdapter(AsyncHTTPRequestAdapter):
38
- def __init__(self, request: web.Request):
38
+ def __init__(self, request: web.Request) -> None:
39
39
  self.request = request
40
40
 
41
41
  @property
@@ -100,7 +100,7 @@ class GraphQLView(
100
100
  GRAPHQL_WS_PROTOCOL,
101
101
  ),
102
102
  connection_init_wait_timeout: timedelta = timedelta(minutes=1),
103
- ):
103
+ ) -> None:
104
104
  self.schema = schema
105
105
  self.allow_queries_via_get = allow_queries_via_get
106
106
  self.keep_alive = keep_alive
@@ -61,7 +61,7 @@ class StrawberryAnnotation:
61
61
  annotation: Union[object, str],
62
62
  *,
63
63
  namespace: Optional[Dict[str, Any]] = None,
64
- ):
64
+ ) -> None:
65
65
  self.raw_annotation = annotation
66
66
  self.namespace = namespace
67
67
 
@@ -54,7 +54,7 @@ class StrawberryArgumentAnnotation:
54
54
  deprecation_reason: Optional[str] = None,
55
55
  directives: Iterable[object] = (),
56
56
  metadata: Optional[Mapping[Any, Any]] = None,
57
- ):
57
+ ) -> None:
58
58
  self.description = description
59
59
  self.name = name
60
60
  self.deprecation_reason = deprecation_reason
@@ -117,7 +117,7 @@ class GraphQL(
117
117
  else:
118
118
  self.graphql_ide = graphql_ide
119
119
 
120
- async def __call__(self, scope: Scope, receive: Receive, send: Send):
120
+ async def __call__(self, scope: Scope, receive: Receive, send: Send) -> None:
121
121
  if scope["type"] == "http":
122
122
  return await self.handle_http(scope, receive, send)
123
123
 
@@ -26,7 +26,7 @@ class GraphQLTransportWSHandler(BaseGraphQLTransportWSHandler):
26
26
  get_context: Callable,
27
27
  get_root_value: Callable,
28
28
  ws: WebSocket,
29
- ):
29
+ ) -> None:
30
30
  super().__init__(schema, debug, connection_init_wait_timeout)
31
31
  self._get_context = get_context
32
32
  self._get_root_value = get_root_value
@@ -25,7 +25,7 @@ class GraphQLWSHandler(BaseGraphQLWSHandler):
25
25
  get_context: Callable,
26
26
  get_root_value: Callable,
27
27
  ws: WebSocket,
28
- ):
28
+ ) -> None:
29
29
  super().__init__(schema, debug, keep_alive, keep_alive_interval)
30
30
  self._get_context = get_context
31
31
  self._get_root_value = get_root_value
@@ -46,5 +46,5 @@ class GraphQLTestClient(BaseGraphQLTestClient):
46
46
  headers=headers,
47
47
  )
48
48
 
49
- def _decode(self, response: Any, type: Literal["multipart", "json"]):
49
+ def _decode(self, response: Any, type: Literal["multipart", "json"]) -> Any:
50
50
  return response.json()
@@ -24,11 +24,11 @@ class StrawberryAutoMeta(type):
24
24
 
25
25
  """
26
26
 
27
- def __init__(self, *args: str, **kwargs: Any):
27
+ def __init__(self, *args: str, **kwargs: Any) -> None:
28
28
  self._instance: Optional[StrawberryAuto] = None
29
29
  super().__init__(*args, **kwargs)
30
30
 
31
- def __call__(cls, *args: str, **kwargs: Any):
31
+ def __call__(cls, *args: str, **kwargs: Any) -> Any:
32
32
  if cls._instance is None:
33
33
  cls._instance = super().__call__(*args, **kwargs)
34
34
 
@@ -37,7 +37,7 @@ class StrawberryAutoMeta(type):
37
37
  def __instancecheck__(
38
38
  self,
39
39
  instance: Union[StrawberryAuto, StrawberryAnnotation, StrawberryType, type],
40
- ):
40
+ ) -> bool:
41
41
  if isinstance(instance, StrawberryAnnotation):
42
42
  resolved = instance.raw_annotation
43
43
  if isinstance(resolved, str):
@@ -69,10 +69,10 @@ class StrawberryAutoMeta(type):
69
69
 
70
70
 
71
71
  class StrawberryAuto(metaclass=StrawberryAutoMeta):
72
- def __str__(self):
72
+ def __str__(self) -> str:
73
73
  return "auto"
74
74
 
75
- def __repr__(self):
75
+ def __repr__(self) -> str:
76
76
  return "<auto>"
77
77
 
78
78
 
@@ -17,7 +17,7 @@ if TYPE_CHECKING:
17
17
 
18
18
 
19
19
  class ChaliceHTTPRequestAdapter(SyncHTTPRequestAdapter):
20
- def __init__(self, request: Request):
20
+ def __init__(self, request: Request) -> None:
21
21
  self.request = request
22
22
 
23
23
  @property
@@ -62,7 +62,7 @@ class GraphQLView(
62
62
  graphiql: Optional[bool] = None,
63
63
  graphql_ide: Optional[GraphQL_IDE] = "graphiql",
64
64
  allow_queries_via_get: bool = True,
65
- ):
65
+ ) -> None:
66
66
  self.allow_queries_via_get = allow_queries_via_get
67
67
  self.schema = schema
68
68
  if graphiql is not None:
@@ -68,7 +68,7 @@ class ChannelsConsumer(AsyncConsumer):
68
68
  channel_layer: Optional[ChannelsLayer]
69
69
  channel_receive: Callable[[], Awaitable[dict]]
70
70
 
71
- def __init__(self, *args: str, **kwargs: Any):
71
+ def __init__(self, *args: str, **kwargs: Any) -> None:
72
72
  self.listen_queues: DefaultDict[str, WeakSet[asyncio.Queue]] = defaultdict(
73
73
  WeakSet
74
74
  )
@@ -23,7 +23,7 @@ class GraphQLTransportWSHandler(BaseGraphQLTransportWSHandler):
23
23
  get_context: Callable,
24
24
  get_root_value: Callable,
25
25
  ws: ChannelsWSConsumer,
26
- ):
26
+ ) -> None:
27
27
  super().__init__(schema, debug, connection_init_wait_timeout)
28
28
  self._get_context = get_context
29
29
  self._get_root_value = get_root_value
@@ -22,7 +22,7 @@ class GraphQLWSHandler(BaseGraphQLWSHandler):
22
22
  get_context: Callable,
23
23
  get_root_value: Callable,
24
24
  ws: ChannelsWSConsumer,
25
- ):
25
+ ) -> None:
26
26
  super().__init__(schema, debug, keep_alive, keep_alive_interval)
27
27
  self._get_context = get_context
28
28
  self._get_root_value = get_root_value
@@ -102,7 +102,7 @@ class ChannelsRequest:
102
102
 
103
103
 
104
104
  class BaseChannelsRequestAdapter:
105
- def __init__(self, request: ChannelsRequest):
105
+ def __init__(self, request: ChannelsRequest) -> None:
106
106
  self.request = request
107
107
 
108
108
  @property
@@ -156,7 +156,7 @@ class BaseGraphQLHTTPConsumer(ChannelsConsumer, AsyncHttpConsumer):
156
156
  allow_queries_via_get: bool = True,
157
157
  subscriptions_enabled: bool = True,
158
158
  **kwargs: Any,
159
- ):
159
+ ) -> None:
160
160
  self.schema = schema
161
161
  self.allow_queries_via_get = allow_queries_via_get
162
162
  self.subscriptions_enabled = subscriptions_enabled
@@ -54,7 +54,7 @@ class GraphQLWSConsumer(ChannelsWSConsumer):
54
54
  GRAPHQL_WS_PROTOCOL,
55
55
  ),
56
56
  connection_init_wait_timeout: Optional[datetime.timedelta] = None,
57
- ):
57
+ ) -> None:
58
58
  if connection_init_wait_timeout is None:
59
59
  connection_init_wait_timeout = datetime.timedelta(minutes=1)
60
60
  self.connection_init_wait_timeout = connection_init_wait_timeout
@@ -48,7 +48,7 @@ class GraphQLProtocolTypeRouter(ProtocolTypeRouter):
48
48
  schema: BaseSchema,
49
49
  django_application: Optional[str] = None,
50
50
  url_pattern: str = "^graphql",
51
- ):
51
+ ) -> None:
52
52
  http_urls = [re_path(url_pattern, GraphQLHTTPConsumer.as_asgi(schema=schema))]
53
53
  if django_application is not None:
54
54
  http_urls.append(re_path("^", django_application))
@@ -71,7 +71,7 @@ class GraphQLWebsocketCommunicator(WebsocketCommunicator):
71
71
  protocol: str = GRAPHQL_TRANSPORT_WS_PROTOCOL,
72
72
  connection_params: dict = {},
73
73
  **kwargs: Any,
74
- ):
74
+ ) -> None:
75
75
  """
76
76
 
77
77
  Args:
@@ -152,7 +152,7 @@ class QueryCodegenPlugin:
152
152
 
153
153
 
154
154
  class ConsolePlugin:
155
- def __init__(self, output_dir: Path):
155
+ def __init__(self, output_dir: Path) -> None:
156
156
  self.output_dir = output_dir
157
157
  self.files_generated: List[Path] = []
158
158
 
@@ -305,7 +305,7 @@ class QueryCodegen:
305
305
  schema: Schema,
306
306
  plugins: List[QueryCodegenPlugin],
307
307
  console_plugin: Optional[ConsolePlugin] = None,
308
- ):
308
+ ) -> None:
309
309
  self.schema = schema
310
310
  self.plugin_manager = QueryCodegenPluginManager(plugins, console_plugin)
311
311
  self.types: List[GraphQLType] = []
@@ -67,10 +67,10 @@ class ScalarDefinition(StrawberryType):
67
67
  class ScalarWrapper:
68
68
  _scalar_definition: ScalarDefinition
69
69
 
70
- def __init__(self, wrap: Callable[[Any], Any]):
70
+ def __init__(self, wrap: Callable[[Any], Any]) -> None:
71
71
  self.wrap = wrap
72
72
 
73
- def __call__(self, *args: str, **kwargs: Any):
73
+ def __call__(self, *args: str, **kwargs: Any) -> Any:
74
74
  return self.wrap(*args, **kwargs)
75
75
 
76
76
  def __or__(self, other: Union[StrawberryType, type]) -> StrawberryType:
@@ -1,3 +1,5 @@
1
+ from typing import Any
2
+
1
3
  try:
2
4
  # import modules and objects from external strawberry-graphql-django
3
5
  # package so that it can be used through strawberry.django namespace
@@ -5,7 +7,7 @@ try:
5
7
  except ModuleNotFoundError:
6
8
  import importlib
7
9
 
8
- def __getattr__(name: str):
10
+ def __getattr__(name: str) -> Any:
9
11
  # try to import submodule and raise exception only if it does not exist
10
12
  import_symbol = f"{__name__}.{name}"
11
13
  try:
@@ -12,7 +12,7 @@ class StrawberryDjangoContext:
12
12
  request: HttpRequest
13
13
  response: HttpResponse
14
14
 
15
- def __getitem__(self, key: str):
15
+ def __getitem__(self, key: str) -> Any:
16
16
  # __getitem__ override needed to avoid issues for who's
17
17
  # using info.context["request"]
18
18
  return super().__getattribute__(key)
@@ -62,7 +62,7 @@ class TemporalHttpResponse(JsonResponse):
62
62
 
63
63
 
64
64
  class DjangoHTTPRequestAdapter(SyncHTTPRequestAdapter):
65
- def __init__(self, request: HttpRequest):
65
+ def __init__(self, request: HttpRequest) -> None:
66
66
  self.request = request
67
67
 
68
68
  @property
@@ -97,7 +97,7 @@ class DjangoHTTPRequestAdapter(SyncHTTPRequestAdapter):
97
97
 
98
98
 
99
99
  class AsyncDjangoHTTPRequestAdapter(AsyncHTTPRequestAdapter):
100
- def __init__(self, request: HttpRequest):
100
+ def __init__(self, request: HttpRequest) -> None:
101
101
  self.request = request
102
102
 
103
103
  @property
@@ -140,7 +140,7 @@ class BaseView:
140
140
  allow_queries_via_get: bool = True,
141
141
  subscriptions_enabled: bool = False,
142
142
  **kwargs: Any,
143
- ):
143
+ ) -> None:
144
144
  self.schema = schema
145
145
  self.allow_queries_via_get = allow_queries_via_get
146
146
  self.subscriptions_enabled = subscriptions_enabled
@@ -35,7 +35,7 @@ setup_exception_handler()
35
35
  class WrongReturnTypeForUnion(Exception):
36
36
  """The Union type cannot be resolved because it's not a field"""
37
37
 
38
- def __init__(self, field_name: str, result_type: str):
38
+ def __init__(self, field_name: str, result_type: str) -> None:
39
39
  message = (
40
40
  f'The type "{result_type}" cannot be resolved for the field "{field_name}" '
41
41
  ", are you using a strawberry.field?"
@@ -50,7 +50,7 @@ class UnallowedReturnTypeForUnion(Exception):
50
50
 
51
51
  def __init__(
52
52
  self, field_name: str, result_type: str, allowed_types: Set[GraphQLObjectType]
53
- ):
53
+ ) -> None:
54
54
  formatted_allowed_types = list(sorted(type_.name for type_ in allowed_types))
55
55
 
56
56
  message = (
@@ -63,7 +63,7 @@ class UnallowedReturnTypeForUnion(Exception):
63
63
 
64
64
  # TODO: this doesn't seem to be tested
65
65
  class InvalidTypeInputForUnion(Exception):
66
- def __init__(self, annotation: GraphQLInputObjectType):
66
+ def __init__(self, annotation: GraphQLInputObjectType) -> None:
67
67
  message = f"Union for {annotation} is not supported because it is an Input type"
68
68
  super().__init__(message)
69
69
 
@@ -72,14 +72,14 @@ class InvalidTypeInputForUnion(Exception):
72
72
  class MissingTypesForGenericError(Exception):
73
73
  """Raised when a generic types was used without passing any type."""
74
74
 
75
- def __init__(self, annotation: Union[StrawberryType, type]):
75
+ def __init__(self, annotation: Union[StrawberryType, type]) -> None:
76
76
  message = f'The type "{annotation!r}" is generic, but no type has been passed'
77
77
 
78
78
  super().__init__(message)
79
79
 
80
80
 
81
81
  class UnsupportedTypeError(StrawberryException):
82
- def __init__(self, annotation: Union[StrawberryType, type]):
82
+ def __init__(self, annotation: Union[StrawberryType, type]) -> None:
83
83
  message = f"{annotation} conversion is not supported"
84
84
 
85
85
  super().__init__(message)
@@ -90,7 +90,7 @@ class UnsupportedTypeError(StrawberryException):
90
90
 
91
91
 
92
92
  class MultipleStrawberryArgumentsError(Exception):
93
- def __init__(self, argument_name: str):
93
+ def __init__(self, argument_name: str) -> None:
94
94
  message = (
95
95
  f"Annotation for argument `{argument_name}` cannot have multiple "
96
96
  f"`strawberry.argument`s"
@@ -100,7 +100,7 @@ class MultipleStrawberryArgumentsError(Exception):
100
100
 
101
101
 
102
102
  class WrongNumberOfResultsReturned(Exception):
103
- def __init__(self, expected: int, received: int):
103
+ def __init__(self, expected: int, received: int) -> None:
104
104
  message = (
105
105
  "Received wrong number of results in dataloader, "
106
106
  f"expected: {expected}, received: {received}"
@@ -110,7 +110,7 @@ class WrongNumberOfResultsReturned(Exception):
110
110
 
111
111
 
112
112
  class FieldWithResolverAndDefaultValueError(Exception):
113
- def __init__(self, field_name: str, type_name: str):
113
+ def __init__(self, field_name: str, type_name: str) -> None:
114
114
  message = (
115
115
  f'Field "{field_name}" on type "{type_name}" cannot define a default '
116
116
  "value and a resolver."
@@ -120,7 +120,7 @@ class FieldWithResolverAndDefaultValueError(Exception):
120
120
 
121
121
 
122
122
  class FieldWithResolverAndDefaultFactoryError(Exception):
123
- def __init__(self, field_name: str, type_name: str):
123
+ def __init__(self, field_name: str, type_name: str) -> None:
124
124
  message = (
125
125
  f'Field "{field_name}" on type "{type_name}" cannot define a '
126
126
  "default_factory and a resolver."
@@ -130,14 +130,14 @@ class FieldWithResolverAndDefaultFactoryError(Exception):
130
130
 
131
131
 
132
132
  class MissingQueryError(Exception):
133
- def __init__(self):
133
+ def __init__(self) -> None:
134
134
  message = 'Request data is missing a "query" value'
135
135
 
136
136
  super().__init__(message)
137
137
 
138
138
 
139
139
  class InvalidDefaultFactoryError(Exception):
140
- def __init__(self):
140
+ def __init__(self) -> None:
141
141
  message = "`default_factory` must be a callable that requires no arguments"
142
142
 
143
143
  super().__init__(message)
@@ -146,7 +146,7 @@ class InvalidDefaultFactoryError(Exception):
146
146
  class InvalidCustomContext(Exception):
147
147
  """Raised when a custom context object is of the wrong python type"""
148
148
 
149
- def __init__(self):
149
+ def __init__(self) -> None:
150
150
  message = (
151
151
  "The custom context must be either a class "
152
152
  "that inherits from BaseContext or a dictionary"
@@ -17,7 +17,7 @@ class ConflictingArgumentsError(StrawberryException):
17
17
  self,
18
18
  resolver: StrawberryResolver,
19
19
  arguments: List[str],
20
- ):
20
+ ) -> None:
21
21
  self.function = resolver.wrapped_func
22
22
  self.argument_names = arguments
23
23
 
@@ -20,7 +20,7 @@ class DuplicatedTypeName(StrawberryException):
20
20
  first_cls: Optional[Type],
21
21
  second_cls: Optional[Type],
22
22
  duplicated_type_name: str,
23
- ):
23
+ ) -> None:
24
24
  self.first_cls = first_cls
25
25
  self.second_cls = second_cls
26
26
 
@@ -32,7 +32,7 @@ def _get_handler(exception_type: Type[BaseException]) -> ExceptionHandler:
32
32
  exception_type: Type[BaseException],
33
33
  exception: BaseException,
34
34
  traceback: Optional[TracebackType],
35
- ):
35
+ ) -> None:
36
36
  try:
37
37
  rich.print(exception)
38
38
 
@@ -20,7 +20,7 @@ class InvalidArgumentTypeError(StrawberryException):
20
20
  self,
21
21
  resolver: StrawberryResolver,
22
22
  argument: StrawberryArgument,
23
- ):
23
+ ) -> None:
24
24
  from strawberry.union import StrawberryUnion
25
25
 
26
26
  self.function = resolver.wrapped_func
@@ -15,7 +15,11 @@ if TYPE_CHECKING:
15
15
  class MissingArgumentsAnnotationsError(StrawberryException):
16
16
  """The field is missing the annotation for one or more arguments"""
17
17
 
18
- def __init__(self, resolver: StrawberryResolver, arguments: List[str]):
18
+ def __init__(
19
+ self,
20
+ resolver: StrawberryResolver,
21
+ arguments: List[str],
22
+ ) -> None:
19
23
  self.missing_arguments = arguments
20
24
  self.function = resolver.wrapped_func
21
25
  self.argument_name = arguments[0]
@@ -11,7 +11,7 @@ if TYPE_CHECKING:
11
11
 
12
12
 
13
13
  class MissingFieldAnnotationError(StrawberryException):
14
- def __init__(self, field_name: str, cls: Type):
14
+ def __init__(self, field_name: str, cls: Type) -> None:
15
15
  self.cls = cls
16
16
  self.field_name = field_name
17
17
 
@@ -15,7 +15,11 @@ if TYPE_CHECKING:
15
15
  class MissingReturnAnnotationError(StrawberryException):
16
16
  """The field is missing the return annotation"""
17
17
 
18
- def __init__(self, field_name: str, resolver: StrawberryResolver):
18
+ def __init__(
19
+ self,
20
+ field_name: str,
21
+ resolver: StrawberryResolver,
22
+ ) -> None:
19
23
  self.function = resolver.wrapped_func
20
24
 
21
25
  self.message = (
@@ -13,7 +13,7 @@ if TYPE_CHECKING:
13
13
 
14
14
 
15
15
  class NotAStrawberryEnumError(StrawberryException):
16
- def __init__(self, enum: EnumMeta):
16
+ def __init__(self, enum: EnumMeta) -> None:
17
17
  self.enum = enum
18
18
 
19
19
  self.message = f'Enum "{enum.__name__}" is not a Strawberry enum.'
@@ -17,7 +17,7 @@ class ObjectIsNotClassError(StrawberryException):
17
17
  INTERFACE = "interface"
18
18
  TYPE = "type"
19
19
 
20
- def __init__(self, obj: object, method_type: MethodType):
20
+ def __init__(self, obj: object, method_type: MethodType) -> None:
21
21
  self.obj = obj
22
22
  self.function = obj
23
23
 
@@ -13,7 +13,7 @@ if TYPE_CHECKING:
13
13
 
14
14
 
15
15
  class ObjectIsNotAnEnumError(StrawberryException):
16
- def __init__(self, cls: Type[Enum]):
16
+ def __init__(self, cls: Type[Enum]) -> None:
17
17
  self.cls = cls
18
18
  self.message = (
19
19
  "strawberry.enum can only be used with subclasses of Enum. "
@@ -12,7 +12,7 @@ if TYPE_CHECKING:
12
12
 
13
13
 
14
14
  class PermissionFailSilentlyRequiresOptionalError(StrawberryException):
15
- def __init__(self, field: StrawberryField):
15
+ def __init__(self, field: StrawberryField) -> None:
16
16
  self.field = field
17
17
  self.message = (
18
18
  "Cannot use fail_silently=True with a non-optional " "or non-list field"
@@ -11,7 +11,7 @@ if TYPE_CHECKING:
11
11
 
12
12
 
13
13
  class PrivateStrawberryFieldError(StrawberryException):
14
- def __init__(self, field_name: str, cls: Type):
14
+ def __init__(self, field_name: str, cls: Type) -> None:
15
15
  self.cls = cls
16
16
  self.field_name = field_name
17
17
 
@@ -19,7 +19,7 @@ class ScalarAlreadyRegisteredError(StrawberryException):
19
19
  self,
20
20
  scalar_definition: ScalarDefinition,
21
21
  other_scalar_definition: ScalarDefinition,
22
- ):
22
+ ) -> None:
23
23
  self.scalar_definition = scalar_definition
24
24
 
25
25
  scalar_name = scalar_definition.name
@@ -19,7 +19,7 @@ class UnresolvedFieldTypeError(StrawberryException):
19
19
  self,
20
20
  type_definition: StrawberryObjectDefinition,
21
21
  field: StrawberryField,
22
- ):
22
+ ) -> None:
23
23
  self.type_definition = type_definition
24
24
  self.field = field
25
25
 
@@ -237,7 +237,7 @@ class PydanticV1Compat:
237
237
 
238
238
 
239
239
  class PydanticCompat:
240
- def __init__(self, is_v2: bool):
240
+ def __init__(self, is_v2: bool) -> None:
241
241
  if is_v2:
242
242
  self._compat = PydanticV2Compat()
243
243
  else: