inline-snapshot 0.36.2__tar.gz → 0.37.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 (245) hide show
  1. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/AGENTS.md +8 -5
  2. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/CHANGELOG.md +7 -0
  3. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/PKG-INFO +1 -1
  4. inline_snapshot-0.37.0/benchmarks/_compat.py +14 -0
  5. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/benchmarks/bench_pytest.py +3 -3
  6. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/benchmarks/bench_snapshot.py +2 -3
  7. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/conftest.py +1 -1
  8. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/docs/external/external.md +1 -1
  9. inline_snapshot-0.37.0/docs/is_snapshot.md +7 -0
  10. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/mkdocs.yml +1 -0
  11. inline_snapshot-0.37.0/src/inline_snapshot/__init__.py +45 -0
  12. {inline_snapshot-0.36.2/src/inline_snapshot → inline_snapshot-0.37.0/src/inline_snapshot/_core}/__init__.py +17 -16
  13. {inline_snapshot-0.36.2/src/inline_snapshot → inline_snapshot-0.37.0/src/inline_snapshot/_core}/_change.py +5 -5
  14. {inline_snapshot-0.36.2/src/inline_snapshot → inline_snapshot-0.37.0/src/inline_snapshot/_core}/_code_repr.py +9 -9
  15. {inline_snapshot-0.36.2/src/inline_snapshot → inline_snapshot-0.37.0/src/inline_snapshot/_core}/_config.py +1 -1
  16. {inline_snapshot-0.36.2/src/inline_snapshot → inline_snapshot-0.37.0/src/inline_snapshot/_core}/_customize/_builder.py +11 -11
  17. {inline_snapshot-0.36.2/src/inline_snapshot → inline_snapshot-0.37.0/src/inline_snapshot/_core}/_customize/_custom.py +3 -3
  18. {inline_snapshot-0.36.2/src/inline_snapshot → inline_snapshot-0.37.0/src/inline_snapshot/_core}/_customize/_custom_call.py +4 -4
  19. {inline_snapshot-0.36.2/src/inline_snapshot → inline_snapshot-0.37.0/src/inline_snapshot/_core}/_customize/_custom_code.py +5 -5
  20. {inline_snapshot-0.36.2/src/inline_snapshot → inline_snapshot-0.37.0/src/inline_snapshot/_core}/_customize/_custom_dict.py +3 -3
  21. {inline_snapshot-0.36.2/src/inline_snapshot → inline_snapshot-0.37.0/src/inline_snapshot/_core}/_customize/_custom_external.py +8 -8
  22. {inline_snapshot-0.36.2/src/inline_snapshot → inline_snapshot-0.37.0/src/inline_snapshot/_core}/_customize/_custom_sequence.py +4 -4
  23. {inline_snapshot-0.36.2/src/inline_snapshot → inline_snapshot-0.37.0/src/inline_snapshot/_core}/_customize/_custom_undefined.py +4 -4
  24. {inline_snapshot-0.36.2/src/inline_snapshot → inline_snapshot-0.37.0/src/inline_snapshot/_core}/_customize/_custom_unmanaged.py +3 -3
  25. {inline_snapshot-0.36.2/src/inline_snapshot → inline_snapshot-0.37.0/src/inline_snapshot/_core}/_customize/_uncustomized.py +4 -4
  26. {inline_snapshot-0.36.2/src/inline_snapshot → inline_snapshot-0.37.0/src/inline_snapshot/_core}/_external/_external.py +19 -17
  27. {inline_snapshot-0.36.2/src/inline_snapshot → inline_snapshot-0.37.0/src/inline_snapshot/_core}/_external/_external_base.py +7 -7
  28. {inline_snapshot-0.36.2/src/inline_snapshot → inline_snapshot-0.37.0/src/inline_snapshot/_core}/_external/_external_file.py +7 -5
  29. {inline_snapshot-0.36.2/src/inline_snapshot → inline_snapshot-0.37.0/src/inline_snapshot/_core}/_external/_external_location.py +6 -6
  30. {inline_snapshot-0.36.2/src/inline_snapshot → inline_snapshot-0.37.0/src/inline_snapshot/_core}/_external/_find_external.py +1 -1
  31. {inline_snapshot-0.36.2/src/inline_snapshot → inline_snapshot-0.37.0/src/inline_snapshot/_core}/_external/_format/_binary.py +1 -1
  32. {inline_snapshot-0.36.2/src/inline_snapshot → inline_snapshot-0.37.0/src/inline_snapshot/_core}/_external/_format/_json.py +1 -1
  33. {inline_snapshot-0.36.2/src/inline_snapshot → inline_snapshot-0.37.0/src/inline_snapshot/_core}/_external/_format/_protocol.py +5 -5
  34. {inline_snapshot-0.36.2/src/inline_snapshot → inline_snapshot-0.37.0/src/inline_snapshot/_core}/_external/_format/_rich_svg.py +2 -2
  35. {inline_snapshot-0.36.2/src/inline_snapshot → inline_snapshot-0.37.0/src/inline_snapshot/_core}/_external/_format/_text.py +1 -1
  36. {inline_snapshot-0.36.2/src/inline_snapshot → inline_snapshot-0.37.0/src/inline_snapshot/_core}/_external/_outsource.py +5 -9
  37. {inline_snapshot-0.36.2/src/inline_snapshot → inline_snapshot-0.37.0/src/inline_snapshot/_core}/_external/_storage/_hash.py +1 -1
  38. {inline_snapshot-0.36.2/src/inline_snapshot → inline_snapshot-0.37.0/src/inline_snapshot/_core}/_external/_storage/_protocol.py +1 -1
  39. {inline_snapshot-0.36.2/src/inline_snapshot → inline_snapshot-0.37.0/src/inline_snapshot/_core}/_external/_storage/_uuid.py +3 -3
  40. {inline_snapshot-0.36.2/src/inline_snapshot → inline_snapshot-0.37.0/src/inline_snapshot/_core}/_external/_tracked_files.py +1 -1
  41. {inline_snapshot-0.36.2/src/inline_snapshot → inline_snapshot-0.37.0/src/inline_snapshot/_core}/_format.py +2 -2
  42. {inline_snapshot-0.36.2/src/inline_snapshot → inline_snapshot-0.37.0/src/inline_snapshot/_core}/_get_snapshot_value.py +4 -6
  43. {inline_snapshot-0.36.2/src/inline_snapshot → inline_snapshot-0.37.0/src/inline_snapshot/_core}/_global_state.py +22 -13
  44. {inline_snapshot-0.36.2/src/inline_snapshot → inline_snapshot-0.37.0/src/inline_snapshot/_core}/_inline_snapshot.py +3 -3
  45. {inline_snapshot-0.36.2/src/inline_snapshot → inline_snapshot-0.37.0/src/inline_snapshot/_core}/_is.py +2 -3
  46. inline_snapshot-0.37.0/src/inline_snapshot/_core/_is_snapshot.py +21 -0
  47. {inline_snapshot-0.36.2/src/inline_snapshot → inline_snapshot-0.37.0/src/inline_snapshot/_core}/_problems.py +2 -2
  48. inline_snapshot-0.36.2/src/inline_snapshot/_new_adapter.py → inline_snapshot-0.37.0/src/inline_snapshot/_core/_reconcile.py +52 -98
  49. {inline_snapshot-0.36.2/src/inline_snapshot → inline_snapshot-0.37.0/src/inline_snapshot/_core}/_snapshot/_operation/base.py +1 -1
  50. {inline_snapshot-0.36.2/src/inline_snapshot → inline_snapshot-0.37.0/src/inline_snapshot/_core}/_snapshot/_operation/collection_operation.py +6 -6
  51. {inline_snapshot-0.36.2/src/inline_snapshot → inline_snapshot-0.37.0/src/inline_snapshot/_core}/_snapshot/_operation/dict_operation.py +5 -5
  52. {inline_snapshot-0.36.2/src/inline_snapshot → inline_snapshot-0.37.0/src/inline_snapshot/_core}/_snapshot/_operation/eq_operation.py +5 -5
  53. {inline_snapshot-0.36.2/src/inline_snapshot → inline_snapshot-0.37.0/src/inline_snapshot/_core}/_snapshot/_operation/min_max_operation.py +4 -4
  54. {inline_snapshot-0.36.2/src/inline_snapshot → inline_snapshot-0.37.0/src/inline_snapshot/_core}/_snapshot/snapshot_data.py +3 -3
  55. {inline_snapshot-0.36.2/src/inline_snapshot → inline_snapshot-0.37.0/src/inline_snapshot/_core}/_snapshot/snapshot_value.py +13 -13
  56. {inline_snapshot-0.36.2/src/inline_snapshot → inline_snapshot-0.37.0/src/inline_snapshot/_core}/_snapshot/value_conversion.py +67 -17
  57. {inline_snapshot-0.36.2/src/inline_snapshot → inline_snapshot-0.37.0/src/inline_snapshot/_core}/_snapshot_arg.py +17 -17
  58. inline_snapshot-0.36.2/src/inline_snapshot/_adapter_context.py → inline_snapshot-0.37.0/src/inline_snapshot/_core/_snapshot_context.py +2 -2
  59. {inline_snapshot-0.36.2/src/inline_snapshot → inline_snapshot-0.37.0/src/inline_snapshot/_core}/_snapshot_session.py +18 -19
  60. {inline_snapshot-0.36.2/src/inline_snapshot → inline_snapshot-0.37.0/src/inline_snapshot/_core}/_source_file.py +4 -4
  61. {inline_snapshot-0.36.2/src/inline_snapshot → inline_snapshot-0.37.0/src/inline_snapshot/_core}/_types.py +1 -1
  62. {inline_snapshot-0.36.2/src/inline_snapshot → inline_snapshot-0.37.0/src/inline_snapshot/_core}/_utils.py +1 -1
  63. inline_snapshot-0.37.0/src/inline_snapshot/_core/plugin/__init__.py +18 -0
  64. {inline_snapshot-0.36.2/src/inline_snapshot → inline_snapshot-0.37.0/src/inline_snapshot/_core}/plugin/_default_plugin.py +8 -151
  65. {inline_snapshot-0.36.2/src/inline_snapshot → inline_snapshot-0.37.0/src/inline_snapshot/_core}/plugin/_spec.py +1 -1
  66. inline_snapshot-0.37.0/src/inline_snapshot/_extensions/__init__.py +1 -0
  67. inline_snapshot-0.37.0/src/inline_snapshot/_extensions/attrs.py +41 -0
  68. inline_snapshot-0.37.0/src/inline_snapshot/_extensions/dirty_equals.py +39 -0
  69. inline_snapshot-0.37.0/src/inline_snapshot/_extensions/pydantic.py +54 -0
  70. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/src/inline_snapshot/extra.py +4 -5
  71. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/src/inline_snapshot/fix_pytest_diff.py +2 -2
  72. inline_snapshot-0.37.0/src/inline_snapshot/plugin.py +19 -0
  73. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/src/inline_snapshot/pydantic_fix.py +1 -1
  74. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/src/inline_snapshot/pytest_plugin.py +11 -11
  75. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/src/inline_snapshot/testing/_example.py +13 -13
  76. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/src/inline_snapshot/testing/_terminal_svg.py +1 -1
  77. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/src/inline_snapshot/version.py +1 -1
  78. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/tests/adapter/test_change_types.py +1 -1
  79. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/tests/adapter/test_sequence.py +1 -1
  80. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/tests/conftest.py +1 -1
  81. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/tests/external/storage/test_hash.py +1 -1
  82. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/tests/external/storage/test_uuid.py +1 -1
  83. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/tests/external/test_external.py +12 -12
  84. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/tests/external/test_external_file.py +2 -2
  85. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/tests/external/test_external_location.py +2 -2
  86. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/tests/external/test_formats.py +5 -5
  87. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/tests/test_align.py +2 -2
  88. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/tests/test_benchmark_fixtures.py +18 -2
  89. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/tests/test_change.py +10 -10
  90. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/tests/test_change_collection_error.py +3 -3
  91. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/tests/test_code_repr.py +7 -7
  92. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/tests/test_config.py +3 -3
  93. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/tests/test_dirty_equals.py +1 -1
  94. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/tests/test_docs.py +6 -6
  95. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/tests/test_encoding.py +2 -2
  96. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/tests/test_get_snapshot_value.py +2 -2
  97. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/tests/test_hasrepr.py +1 -1
  98. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/tests/test_inline_snapshot.py +8 -8
  99. inline_snapshot-0.37.0/tests/test_is_snapshot.py +94 -0
  100. inline_snapshot-0.37.0/tests/test_optional_extensions.py +41 -0
  101. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/tests/test_preserve_values.py +1 -1
  102. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/tests/test_pypy.py +1 -1
  103. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/tests/test_rewrite_code.py +6 -6
  104. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/tests/test_snapshot_arg.py +35 -35
  105. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/tests/test_snapshot_arg_unmanaged.py +1 -1
  106. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/tests/test_string.py +2 -2
  107. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/tests/utils.py +1 -1
  108. inline_snapshot-0.36.2/src/inline_snapshot/plugin/__init__.py +0 -18
  109. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/.github/FUNDING.yml +0 -0
  110. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/.github/actions/setup/action.yml +0 -0
  111. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/.github/copilot-instructions.md +0 -0
  112. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/.github/pull_request_template.md +0 -0
  113. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/.github/workflows/benchmark-report.yml +0 -0
  114. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/.github/workflows/benchmarks.yml +0 -0
  115. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/.github/workflows/ci.yml +0 -0
  116. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/.github/workflows/cog.yml +0 -0
  117. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/.github/workflows/deploy_development_docs.yml +0 -0
  118. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/.github/workflows/docs.yml +0 -0
  119. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/.github/workflows/test_docs.yml +0 -0
  120. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/.gitignore +0 -0
  121. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/.inline-snapshot/external/.gitignore +0 -0
  122. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/.inline-snapshot/external/ef2d127de37b942baad06145e54b0c619a1f22327b2ebbcfbec78f5564afe39d.json +0 -0
  123. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/.inline-snapshot/files_using_external.txt +0 -0
  124. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/.pre-commit-config.yaml +0 -0
  125. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/CONTRIBUTING.md +0 -0
  126. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/LICENSE +0 -0
  127. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/MANIFEST.in +0 -0
  128. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/README.md +0 -0
  129. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/asv.conf.json +0 -0
  130. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/benchmarks/README.md +0 -0
  131. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/benchmarks/__init__.py +0 -0
  132. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/benchmarks/_fixtures.py +0 -0
  133. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/benchmarks/_workloads.py +0 -0
  134. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/changelog.d/.gitkeep +0 -0
  135. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/docs/alternatives.md +0 -0
  136. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/docs/assets/code_generation/string-update.rich.svg +0 -0
  137. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/docs/assets/create_fix.mp4 +0 -0
  138. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/docs/assets/favicon.png +0 -0
  139. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/docs/assets/favicon.svg +0 -0
  140. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/docs/assets/introduction/show-error.rich.svg +0 -0
  141. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/docs/assets/introduction/simple-example-changed.rich.svg +0 -0
  142. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/docs/assets/introduction/simple-example.rich.svg +0 -0
  143. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/docs/assets/logo.svg +0 -0
  144. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/docs/assets/logo_orig.svg +0 -0
  145. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/docs/assets/pycharm_run.mp4 +0 -0
  146. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/docs/assets/pytest/create-fix-trim-update.rich.svg +0 -0
  147. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/docs/assets/pytest/report.rich.svg +0 -0
  148. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/docs/assets/pytest/review.rich.svg +0 -0
  149. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/docs/assets/pytest/short-report.rich.svg +0 -0
  150. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/docs/assets/readme/example-snapshot-arg.rich.svg +0 -0
  151. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/docs/assets/readme/example-snapshot.rich.svg +0 -0
  152. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/docs/categories.md +0 -0
  153. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/docs/changelog.md +0 -0
  154. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/docs/cmp_snapshot.md +0 -0
  155. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/docs/code_generation.md +0 -0
  156. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/docs/configuration.md +0 -0
  157. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/docs/contributing.md +0 -0
  158. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/docs/customize_repr.md +0 -0
  159. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/docs/eq_snapshot.md +0 -0
  160. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/docs/external/assets/register-is-array-for.rich.svg +0 -0
  161. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/docs/external/assets/register-numberset-format.rich.svg +0 -0
  162. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/docs/external/external_file.md +0 -0
  163. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/docs/external/outsource.md +0 -0
  164. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/docs/external/register_format.md +0 -0
  165. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/docs/extra.md +0 -0
  166. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/docs/fix_assert.md +0 -0
  167. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/docs/get_snapshot_value.md +0 -0
  168. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/docs/getitem_snapshot.md +0 -0
  169. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/docs/howto/parametrize.md +0 -0
  170. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/docs/in_snapshot.md +0 -0
  171. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/docs/index.md +0 -0
  172. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/docs/insiders.md +0 -0
  173. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/docs/limitations.md +0 -0
  174. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/docs/plugin.md +0 -0
  175. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/docs/plugins/pyproject.toml +0 -0
  176. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/docs/plugins/replace_url.py +0 -0
  177. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/docs/pycharm.md +0 -0
  178. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/docs/pytest.md +0 -0
  179. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/docs/snapshot_arg.md +0 -0
  180. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/docs/styles/extra.css +0 -0
  181. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/docs/testing.md +0 -0
  182. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/docs/theme/main.html +0 -0
  183. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/docs/third_party.md +0 -0
  184. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/docs/types.md +0 -0
  185. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/known_issues/pydantic-ai-report-memory.md +0 -0
  186. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/pyproject.toml +0 -0
  187. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/redeploy_docs.sh +0 -0
  188. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/scripts/clean_changelog_fragments.py +0 -0
  189. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/scripts/replace_words.py +0 -0
  190. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/scripts/test_downstream.py +0 -0
  191. {inline_snapshot-0.36.2/src/inline_snapshot → inline_snapshot-0.37.0/src/inline_snapshot/_core}/_align.py +0 -0
  192. {inline_snapshot-0.36.2/src/inline_snapshot → inline_snapshot-0.37.0/src/inline_snapshot/_core}/_compare_context.py +0 -0
  193. {inline_snapshot-0.36.2/src/inline_snapshot → inline_snapshot-0.37.0/src/inline_snapshot/_core}/_customize/__init__.py +0 -0
  194. {inline_snapshot-0.36.2/src/inline_snapshot → inline_snapshot-0.37.0/src/inline_snapshot/_core}/_exceptions.py +0 -0
  195. {inline_snapshot-0.36.2/src/inline_snapshot → inline_snapshot-0.37.0/src/inline_snapshot/_core}/_external/__init__.py +0 -0
  196. {inline_snapshot-0.36.2/src/inline_snapshot → inline_snapshot-0.37.0/src/inline_snapshot/_core}/_external/_diff.py +0 -0
  197. {inline_snapshot-0.36.2/src/inline_snapshot → inline_snapshot-0.37.0/src/inline_snapshot/_core}/_external/_format/__init__.py +0 -0
  198. {inline_snapshot-0.36.2/src/inline_snapshot → inline_snapshot-0.37.0/src/inline_snapshot/_core}/_external/_storage/__init__.py +0 -0
  199. {inline_snapshot-0.36.2/src/inline_snapshot → inline_snapshot-0.37.0/src/inline_snapshot/_core}/_flags.py +0 -0
  200. {inline_snapshot-0.36.2/src/inline_snapshot → inline_snapshot-0.37.0/src/inline_snapshot/_core}/_generator_utils.py +0 -0
  201. {inline_snapshot-0.36.2/src/inline_snapshot → inline_snapshot-0.37.0/src/inline_snapshot/_core}/_rewrite_code.py +0 -0
  202. {inline_snapshot-0.36.2/src/inline_snapshot → inline_snapshot-0.37.0/src/inline_snapshot/_core}/_sentinels.py +0 -0
  203. {inline_snapshot-0.36.2/src/inline_snapshot → inline_snapshot-0.37.0/src/inline_snapshot/_core}/_snapshot/__init__.py +0 -0
  204. {inline_snapshot-0.36.2/src/inline_snapshot → inline_snapshot-0.37.0/src/inline_snapshot/_core}/_snapshot/_operation/__init__.py +0 -0
  205. {inline_snapshot-0.36.2/src/inline_snapshot → inline_snapshot-0.37.0/src/inline_snapshot/_core}/_unmanaged.py +0 -0
  206. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/src/inline_snapshot/_fix_assert.py +0 -0
  207. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/src/inline_snapshot/fix_pytest_cache.py +0 -0
  208. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/src/inline_snapshot/py.typed +0 -0
  209. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/src/inline_snapshot/syntax_warnings.py +0 -0
  210. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/src/inline_snapshot/testing/__init__.py +0 -0
  211. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/test-repos.json +0 -0
  212. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/testing/generate_tests.py +0 -0
  213. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/tests/__init__.py +0 -0
  214. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/tests/adapter/test_call.py +0 -0
  215. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/tests/adapter/test_dataclass.py +0 -0
  216. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/tests/adapter/test_dict.py +0 -0
  217. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/tests/adapter/test_general.py +0 -0
  218. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/tests/adapter/test_namedtuple.py +0 -0
  219. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/tests/external/__init__.py +0 -0
  220. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/tests/external/storage/test_generic.py +0 -0
  221. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/tests/external/test_module_name.py +0 -0
  222. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/tests/test_builder.py +0 -0
  223. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/tests/test_ci.py +0 -0
  224. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/tests/test_customize.py +0 -0
  225. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/tests/test_datetime_timezone.py +0 -0
  226. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/tests/test_example.py +0 -0
  227. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/tests/test_formatting.py +0 -0
  228. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/tests/test_fstring.py +0 -0
  229. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/tests/test_is.py +0 -0
  230. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/tests/test_pydantic.py +0 -0
  231. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/tests/test_pytest_diff_fix.py +0 -0
  232. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/tests/test_pytest_plugin.py +0 -0
  233. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/tests/test_pytester.py +0 -0
  234. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/tests/test_raises.py +0 -0
  235. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/tests/test_skip_updates.py +0 -0
  236. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/tests/test_snapshot_value.py +0 -0
  237. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/tests/test_storage.py +0 -0
  238. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/tests/test_transformed.py +0 -0
  239. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/tests/test_typing.py +0 -0
  240. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/tests/test_update.py +0 -0
  241. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/tests/test_warns.py +0 -0
  242. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/tests/test_without_node.py +0 -0
  243. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/tests/test_xdist.py +0 -0
  244. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/tests/test_xfail.py +0 -0
  245. {inline_snapshot-0.36.2 → inline_snapshot-0.37.0}/uv.lock +0 -0
@@ -10,11 +10,14 @@ The project supports Python 3.9 through 3.14 and PyPy where possible. CI runs ac
10
10
 
11
11
  - `src/inline_snapshot/`: package source.
12
12
  - `src/inline_snapshot/pytest_plugin.py`: pytest entry point and CLI flag handling.
13
- - `src/inline_snapshot/_inline_snapshot.py`, `_snapshot_arg.py`, `_get_snapshot_value.py`: main public snapshot behavior.
14
- - `src/inline_snapshot/_snapshot/`: snapshot value implementations such as equality, dict, min/max, collection, and undecided values.
15
- - `src/inline_snapshot/_customize/`: code-generation customization support.
16
- - `src/inline_snapshot/_external/`: external snapshot files, formats, storage, diffing, and outsourcing.
17
- - `src/inline_snapshot/plugin/`: first-party plugin hook specification and default plugin.
13
+ - `src/inline_snapshot/_core/_snapshot_session.py`: snapshot sessions, reporting, and applying changes.
14
+ - `src/inline_snapshot/_core/_inline_snapshot.py`, `_snapshot_arg.py`, `_get_snapshot_value.py`: main public snapshot behavior.
15
+ - `src/inline_snapshot/_core/_snapshot/`: snapshot value implementations such as equality, dict, min/max, collection, and undecided values.
16
+ - `src/inline_snapshot/_core/_customize/`: code-generation customization support.
17
+ - `src/inline_snapshot/_core/_external/`: external snapshot files, formats, storage, diffing, and outsourcing.
18
+ - `src/inline_snapshot/_core/plugin/`: plugin hook specification and default plugin.
19
+ - `src/inline_snapshot/plugin.py`: public customization API.
20
+ - `src/inline_snapshot/_extensions/`: optional attrs, Pydantic, and dirty-equals plugins.
18
21
  - `src/inline_snapshot/testing/_example.py`: preferred test harness for new behavior tests.
19
22
  - `tests/`: pytest suite. Adapter tests live in `tests/adapter/`; external snapshot tests live in `tests/external/`.
20
23
  - `docs/`: MkDocs Material documentation.
@@ -1,4 +1,11 @@
1
1
 
2
+ <a id='changelog-0.37.0'></a>
3
+ # v0.37.0 — 2026-11-18
4
+
5
+ ## Added
6
+
7
+ - Added `is_snapshot()` so extensions can recognize inline and external snapshot objects.
8
+
2
9
  <a id='changelog-0.36.2'></a>
3
10
  # v0.36.2 — 2026-11-09
4
11
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: inline-snapshot
3
- Version: 0.36.2
3
+ Version: 0.37.0
4
4
  Summary: golden master/snapshot/approval testing library which puts the values right into your source code
5
5
  Project-URL: Changelog, https://15r10nk.github.io/inline-snapshot/latest/changelog/
6
6
  Project-URL: Discussions, https://github.com/15r10nk/inline-snapshots/discussions
@@ -0,0 +1,14 @@
1
+ """Support benchmarking revisions before and after the core package move."""
2
+
3
+ from importlib import import_module
4
+ from importlib.util import find_spec
5
+
6
+
7
+ def global_state_module():
8
+ if find_spec("inline_snapshot._core") is not None:
9
+ return "inline_snapshot._core._global_state"
10
+ return "inline_snapshot._global_state"
11
+
12
+
13
+ def snapshot_env():
14
+ return import_module(global_state_module()).snapshot_env()
@@ -7,6 +7,8 @@ import sys
7
7
  from pathlib import Path
8
8
  from tempfile import TemporaryDirectory
9
9
 
10
+ from ._compat import global_state_module
11
+ from ._compat import snapshot_env
10
12
  from ._fixtures import BATCH_SIZE
11
13
  from ._fixtures import SUITE_VERSION
12
14
  from ._fixtures import pytest_source
@@ -32,7 +34,7 @@ class PytestSession:
32
34
  self.original = pytest_source(mode)
33
35
  self.path.write_text(self.original, encoding="utf-8")
34
36
  (self.root / "conftest.py").write_text(
35
- "from inline_snapshot._global_state import state\n"
37
+ f"from {global_state_module()} import state\n"
36
38
  "def pytest_sessionfinish(session):\n"
37
39
  f" assert state().active is {mode != 'disabled'}\n",
38
40
  encoding="utf-8",
@@ -106,8 +108,6 @@ class PytestSession:
106
108
  ), output
107
109
  if changed:
108
110
  # A fast no-rewriting check validates the resulting expected values.
109
- from inline_snapshot._global_state import snapshot_env
110
-
111
111
  from ._fixtures import load_module
112
112
 
113
113
  with snapshot_env() as state:
@@ -6,6 +6,7 @@ from pathlib import Path
6
6
  from tempfile import TemporaryDirectory
7
7
  from textwrap import dedent
8
8
 
9
+ from ._compat import snapshot_env
9
10
  from ._fixtures import CASES
10
11
  from ._fixtures import SUITE_VERSION
11
12
 
@@ -72,7 +73,7 @@ class Comparison:
72
73
 
73
74
  sys.path.insert(0, {str(Path(__file__).resolve().parent.parent)!r})
74
75
  from benchmarks._fixtures import BATCH_SIZE, load_module, snapshot_functions, source
75
- from inline_snapshot._global_state import snapshot_env
76
+ from benchmarks._compat import snapshot_env
76
77
 
77
78
  directory = TemporaryDirectory()
78
79
  atexit.register(directory.cleanup)
@@ -117,8 +118,6 @@ class RetainedSnapshotState:
117
118
  frame_payload_size = 100_000
118
119
 
119
120
  def setup(self, case):
120
- from inline_snapshot._global_state import snapshot_env
121
-
122
121
  from ._fixtures import load_module
123
122
  from ._fixtures import source
124
123
 
@@ -1,6 +1,6 @@
1
1
  import pytest
2
2
 
3
- from inline_snapshot._global_state import snapshot_env
3
+ from inline_snapshot._core._global_state import snapshot_env
4
4
 
5
5
 
6
6
  @pytest.fixture(autouse=True)
@@ -153,7 +153,7 @@ To store data in a different location, set the `storage-dir` option in pyproject
153
153
  inline-snapshot supports several built-in formats for external snapshots. The format used is determined by the given data type: bytes are stored in a `.bin` file, and strings are stored in a `.txt` file by default. More complex data types are stored in a `.json` file.
154
154
 
155
155
  <!--[[[cog
156
- from inline_snapshot._global_state import state
156
+ from inline_snapshot._core._global_state import state
157
157
  import cog
158
158
 
159
159
  cog.out("|Suffix|Priority|Description|\n")
@@ -0,0 +1,7 @@
1
+ ::: inline_snapshot.is_snapshot
2
+ options:
3
+ heading_level: 1
4
+ show_root_heading: true
5
+ show_root_full_path: false
6
+ show_source: false
7
+ annotations_path: brief
@@ -68,6 +68,7 @@ nav:
68
68
  - '@customize_repr': customize_repr.md
69
69
  - types: types.md
70
70
  - get_snapshot_value(): get_snapshot_value.md
71
+ - is_snapshot(): is_snapshot.md
71
72
  - HowTo:
72
73
  - pytest parametrize: howto/parametrize.md
73
74
  - Extensions:
@@ -0,0 +1,45 @@
1
+ from ._core import BinaryDiff
2
+ from ._core import Category
3
+ from ._core import Format
4
+ from ._core import HasRepr
5
+ from ._core import Is
6
+ from ._core import Snapshot
7
+ from ._core import SnapshotArg
8
+ from ._core import TextDiff
9
+ from ._core import UsageError
10
+ from ._core import customize_repr
11
+ from ._core import declare_unmanaged
12
+ from ._core import external
13
+ from ._core import external_file
14
+ from ._core import get_snapshot_value
15
+ from ._core import is_snapshot
16
+ from ._core import outsource
17
+ from ._core import register_format
18
+ from ._core import register_format_alias
19
+ from ._core import snapshot
20
+ from ._core import snapshot_arg
21
+ from .version import __version__
22
+
23
+ __all__ = [
24
+ "snapshot",
25
+ "external",
26
+ "outsource",
27
+ "customize_repr",
28
+ "HasRepr",
29
+ "Is",
30
+ "Category",
31
+ "Snapshot",
32
+ "SnapshotArg",
33
+ "UsageError",
34
+ "register_format_alias",
35
+ "register_format",
36
+ "Format",
37
+ "TextDiff",
38
+ "BinaryDiff",
39
+ "external_file",
40
+ "declare_unmanaged",
41
+ "get_snapshot_value",
42
+ "is_snapshot",
43
+ "snapshot_arg",
44
+ "__version__",
45
+ ]
@@ -1,9 +1,10 @@
1
- from inline_snapshot._external._diff import BinaryDiff
2
- from inline_snapshot._external._diff import TextDiff
1
+ """Core snapshot evaluation, customization, storage, and source rewriting."""
3
2
 
4
3
  from ._code_repr import HasRepr
5
4
  from ._code_repr import customize_repr
6
5
  from ._exceptions import UsageError
6
+ from ._external._diff import BinaryDiff
7
+ from ._external._diff import TextDiff
7
8
  from ._external._external import external
8
9
  from ._external._external_file import external_file
9
10
  from ._external._format._protocol import Format
@@ -13,32 +14,32 @@ from ._external._outsource import outsource
13
14
  from ._get_snapshot_value import get_snapshot_value
14
15
  from ._inline_snapshot import snapshot
15
16
  from ._is import Is
17
+ from ._is_snapshot import is_snapshot
16
18
  from ._snapshot_arg import snapshot_arg
17
19
  from ._types import Category
18
20
  from ._types import Snapshot
19
21
  from ._types import SnapshotArg
20
22
  from ._unmanaged import declare_unmanaged
21
- from .version import __version__
22
23
 
23
24
  __all__ = [
24
- "snapshot",
25
+ "HasRepr",
26
+ "customize_repr",
27
+ "UsageError",
28
+ "BinaryDiff",
29
+ "TextDiff",
25
30
  "external",
31
+ "external_file",
32
+ "Format",
33
+ "register_format",
34
+ "register_format_alias",
26
35
  "outsource",
27
- "customize_repr",
28
- "HasRepr",
36
+ "get_snapshot_value",
37
+ "snapshot",
29
38
  "Is",
39
+ "is_snapshot",
40
+ "snapshot_arg",
30
41
  "Category",
31
42
  "Snapshot",
32
43
  "SnapshotArg",
33
- "UsageError",
34
- "register_format_alias",
35
- "register_format",
36
- "Format",
37
- "TextDiff",
38
- "BinaryDiff",
39
- "external_file",
40
44
  "declare_unmanaged",
41
- "get_snapshot_value",
42
- "snapshot_arg",
43
- "__version__",
44
45
  ]
@@ -12,16 +12,16 @@ from typing import cast
12
12
  from asttokens.util import Token
13
13
  from executing.executing import EnhancedAST
14
14
 
15
- from inline_snapshot._external._external_location import Location
16
- from inline_snapshot._external._find_external import ensure_import
17
- from inline_snapshot._source_file import SourceFile
15
+ from inline_snapshot._core._external._external_location import Location
16
+ from inline_snapshot._core._external._find_external import ensure_import
17
+ from inline_snapshot._core._source_file import SourceFile
18
18
 
19
19
  from ._rewrite_code import ChangeRecorder
20
20
  from ._rewrite_code import end_of
21
21
  from ._rewrite_code import start_of
22
22
 
23
23
  if TYPE_CHECKING:
24
- from inline_snapshot._external._format._protocol import Format
24
+ from inline_snapshot._core._external._format._protocol import Format
25
25
 
26
26
 
27
27
  class ChangeBase:
@@ -94,7 +94,7 @@ class ExternalRemove(ChangeBase):
94
94
 
95
95
  title = f"delete {self.old_location}"
96
96
 
97
- from inline_snapshot._external._format._protocol import (
97
+ from inline_snapshot._core._external._format._protocol import (
98
98
  get_format_handler_from_suffix,
99
99
  )
100
100
 
@@ -9,17 +9,17 @@ from unittest import mock
9
9
 
10
10
  from typing_extensions import deprecated
11
11
 
12
- from inline_snapshot._generator_utils import only_value
12
+ from inline_snapshot._core._generator_utils import only_value
13
13
 
14
14
  if TYPE_CHECKING:
15
- from inline_snapshot._adapter_context import AdapterContext
15
+ from inline_snapshot._core._snapshot_context import SnapshotContext
16
16
 
17
17
 
18
18
  real_repr = repr
19
19
 
20
20
 
21
- def adapter_context_for_parent_frame():
22
- from inline_snapshot._adapter_context import AdapterContext
21
+ def snapshot_context_for_parent_frame():
22
+ from inline_snapshot._core._snapshot_context import SnapshotContext
23
23
 
24
24
  frame = inspect.currentframe()
25
25
  assert frame
@@ -28,7 +28,7 @@ def adapter_context_for_parent_frame():
28
28
  frame = frame.f_back
29
29
  assert frame
30
30
 
31
- return AdapterContext(frame)
31
+ return SnapshotContext(frame)
32
32
 
33
33
 
34
34
  class HasRepr:
@@ -58,7 +58,7 @@ class HasRepr:
58
58
  if type(other) is not self._type:
59
59
  return False
60
60
 
61
- with mock_repr(adapter_context_for_parent_frame()):
61
+ with mock_repr(snapshot_context_for_parent_frame()):
62
62
  other_repr = value_code_repr(other)
63
63
  return other_repr == self._str_repr or other_repr == real_repr(self)
64
64
 
@@ -93,16 +93,16 @@ def customize_repr(f):
93
93
 
94
94
 
95
95
  def code_repr(obj):
96
- with mock_repr(adapter_context_for_parent_frame()):
96
+ with mock_repr(snapshot_context_for_parent_frame()):
97
97
  return repr(obj)
98
98
 
99
99
 
100
100
  @contextmanager
101
- def mock_repr(context: AdapterContext):
101
+ def mock_repr(context: SnapshotContext):
102
102
  assert context is not None
103
103
 
104
104
  def new_repr(obj):
105
- from inline_snapshot._customize._builder import Builder
105
+ from inline_snapshot._core._customize._builder import Builder
106
106
 
107
107
  return only_value(
108
108
  Builder(_snapshot_context=context)._customize_all(obj)._code_repr(context)
@@ -6,7 +6,7 @@ from typing import Dict
6
6
  from typing import List
7
7
  from typing import Optional
8
8
 
9
- from inline_snapshot._exceptions import UsageError
9
+ from inline_snapshot._core._exceptions import UsageError
10
10
 
11
11
  if sys.version_info >= (3, 11):
12
12
  from tomllib import loads
@@ -5,15 +5,15 @@ from dataclasses import dataclass
5
5
  from typing import Any
6
6
  from typing import Callable
7
7
 
8
- from inline_snapshot._adapter_context import AdapterContext
9
- from inline_snapshot._code_repr import HasRepr
10
- from inline_snapshot._code_repr import mock_repr
11
- from inline_snapshot._code_repr import value_code_repr
12
- from inline_snapshot._compare_context import compare_context
13
- from inline_snapshot._customize._custom_sequence import CustomSequence
14
- from inline_snapshot._customize._custom_unmanaged import CustomUnmanaged
15
- from inline_snapshot._customize._uncustomized import Uncustomized
16
- from inline_snapshot._exceptions import UsageError
8
+ from inline_snapshot._core._code_repr import HasRepr
9
+ from inline_snapshot._core._code_repr import mock_repr
10
+ from inline_snapshot._core._code_repr import value_code_repr
11
+ from inline_snapshot._core._compare_context import compare_context
12
+ from inline_snapshot._core._customize._custom_sequence import CustomSequence
13
+ from inline_snapshot._core._customize._custom_unmanaged import CustomUnmanaged
14
+ from inline_snapshot._core._customize._uncustomized import Uncustomized
15
+ from inline_snapshot._core._exceptions import UsageError
16
+ from inline_snapshot._core._snapshot_context import SnapshotContext
17
17
 
18
18
  from ._custom import Custom
19
19
  from ._custom_call import CustomCall
@@ -31,7 +31,7 @@ from ._custom_undefined import CustomUndefined
31
31
 
32
32
  @dataclass
33
33
  class Builder:
34
- _snapshot_context: AdapterContext
34
+ _snapshot_context: SnapshotContext
35
35
  _build_new_value: bool = False
36
36
 
37
37
  def _convert_child(self, v) -> Custom:
@@ -45,7 +45,7 @@ class Builder:
45
45
  return value
46
46
 
47
47
  def _customize(self, v, snapshot_value: Custom) -> Custom:
48
- from inline_snapshot._global_state import state
48
+ from inline_snapshot._core._global_state import state
49
49
 
50
50
  assert not isinstance(v, Custom)
51
51
 
@@ -6,8 +6,8 @@ from abc import abstractmethod
6
6
  from typing import TYPE_CHECKING
7
7
  from typing import Generator
8
8
 
9
- from inline_snapshot._adapter_context import AdapterContext
10
- from inline_snapshot._change import ChangeBase
9
+ from inline_snapshot._core._change import ChangeBase
10
+ from inline_snapshot._core._snapshot_context import SnapshotContext
11
11
 
12
12
  if TYPE_CHECKING:
13
13
  pass
@@ -33,7 +33,7 @@ class Custom(ABC):
33
33
  raise NotImplementedError()
34
34
 
35
35
  @abstractmethod
36
- def _code_repr(self, context: AdapterContext) -> Generator[ChangeBase, None, str]:
36
+ def _code_repr(self, context: SnapshotContext) -> Generator[ChangeBase, None, str]:
37
37
  raise NotImplementedError()
38
38
 
39
39
  def _eval(self):
@@ -5,8 +5,8 @@ from dataclasses import dataclass
5
5
  from dataclasses import field
6
6
  from typing import Generator
7
7
 
8
- from inline_snapshot._adapter_context import AdapterContext
9
- from inline_snapshot._change import ChangeBase
8
+ from inline_snapshot._core._change import ChangeBase
9
+ from inline_snapshot._core._snapshot_context import SnapshotContext
10
10
 
11
11
  from ._custom import Custom
12
12
 
@@ -15,7 +15,7 @@ from ._custom import Custom
15
15
  class CustomDefault(Custom):
16
16
  value: Custom = field(compare=False)
17
17
 
18
- def _code_repr(self, context: AdapterContext) -> Generator[ChangeBase, None, str]:
18
+ def _code_repr(self, context: SnapshotContext) -> Generator[ChangeBase, None, str]:
19
19
  yield from () # pragma: no cover
20
20
  # this should never be called because default values are never converted into code
21
21
  assert False
@@ -37,7 +37,7 @@ class CustomCall(Custom):
37
37
  args: list[Custom] = field(compare=False)
38
38
  kwargs: dict[str, Custom] = field(compare=False)
39
39
 
40
- def _code_repr(self, context: AdapterContext) -> Generator[ChangeBase, None, str]:
40
+ def _code_repr(self, context: SnapshotContext) -> Generator[ChangeBase, None, str]:
41
41
  args = []
42
42
  for a in self.args:
43
43
  code = yield from a._code_repr(context)
@@ -6,10 +6,10 @@ from dataclasses import dataclass
6
6
  from functools import cached_property
7
7
  from typing import Generator
8
8
 
9
- from inline_snapshot._adapter_context import AdapterContext
10
- from inline_snapshot._change import ChangeBase
11
- from inline_snapshot._change import RequiredImport
12
- from inline_snapshot._utils import clone
9
+ from inline_snapshot._core._change import ChangeBase
10
+ from inline_snapshot._core._change import RequiredImport
11
+ from inline_snapshot._core._snapshot_context import SnapshotContext
12
+ from inline_snapshot._core._utils import clone
13
13
 
14
14
  from ._custom import Custom
15
15
 
@@ -63,7 +63,7 @@ class CustomCode(Custom):
63
63
  def _map(self, f):
64
64
  return f(self.value)
65
65
 
66
- def _code_repr(self, context: AdapterContext) -> Generator[ChangeBase, None, str]:
66
+ def _code_repr(self, context: SnapshotContext) -> Generator[ChangeBase, None, str]:
67
67
  for imp in self._imports:
68
68
  if isinstance(imp, Import):
69
69
  yield RequiredImport(flag="fix", file=context.file, module=imp.module)
@@ -5,8 +5,8 @@ from dataclasses import dataclass
5
5
  from dataclasses import field
6
6
  from typing import Generator
7
7
 
8
- from inline_snapshot._adapter_context import AdapterContext
9
- from inline_snapshot._change import ChangeBase
8
+ from inline_snapshot._core._change import ChangeBase
9
+ from inline_snapshot._core._snapshot_context import SnapshotContext
10
10
 
11
11
  from ._custom import Custom
12
12
 
@@ -19,7 +19,7 @@ class CustomDict(Custom):
19
19
  def _map(self, f):
20
20
  return f({k._map(f): v._map(f) for k, v in self.value.items()})
21
21
 
22
- def _code_repr(self, context: AdapterContext) -> Generator[ChangeBase, None, str]:
22
+ def _code_repr(self, context: SnapshotContext) -> Generator[ChangeBase, None, str]:
23
23
  values = []
24
24
  for k, v in self.value.items():
25
25
  key = yield from k._code_repr(context)
@@ -5,12 +5,12 @@ from pathlib import Path
5
5
  from typing import Any
6
6
  from typing import Generator
7
7
 
8
- from inline_snapshot._adapter_context import AdapterContext
9
- from inline_snapshot._change import ChangeBase
10
- from inline_snapshot._change import ExternalChange
11
- from inline_snapshot._change import RequiredImport
12
- from inline_snapshot._external._external_location import ExternalLocation
13
- from inline_snapshot._external._format._protocol import get_format_handler
8
+ from inline_snapshot._core._change import ChangeBase
9
+ from inline_snapshot._core._change import ExternalChange
10
+ from inline_snapshot._core._change import RequiredImport
11
+ from inline_snapshot._core._external._external_location import ExternalLocation
12
+ from inline_snapshot._core._external._format._protocol import get_format_handler
13
+ from inline_snapshot._core._snapshot_context import SnapshotContext
14
14
 
15
15
  from ._custom import Custom
16
16
 
@@ -24,8 +24,8 @@ class CustomExternal(Custom):
24
24
  def _map(self, f):
25
25
  return f(self.value)
26
26
 
27
- def _code_repr(self, context: AdapterContext) -> Generator[ChangeBase, None, str]:
28
- from inline_snapshot._global_state import state
27
+ def _code_repr(self, context: SnapshotContext) -> Generator[ChangeBase, None, str]:
28
+ from inline_snapshot._core._global_state import state
29
29
 
30
30
  storage_name = self.storage or state().config.default_storage
31
31
 
@@ -5,8 +5,8 @@ from dataclasses import dataclass
5
5
  from dataclasses import field
6
6
  from typing import Generator
7
7
 
8
- from inline_snapshot._adapter_context import AdapterContext
9
- from inline_snapshot._change import ChangeBase
8
+ from inline_snapshot._core._change import ChangeBase
9
+ from inline_snapshot._core._snapshot_context import SnapshotContext
10
10
 
11
11
  from ._custom import Custom
12
12
 
@@ -24,7 +24,7 @@ class CustomSequence(Custom, CustomSequenceTypes):
24
24
  def _map(self, f):
25
25
  return f(self.value_type([x._map(f) for x in self.value]))
26
26
 
27
- def _code_repr(self, context: AdapterContext) -> Generator[ChangeBase, None, str]:
27
+ def _code_repr(self, context: SnapshotContext) -> Generator[ChangeBase, None, str]:
28
28
  values = []
29
29
  for v in self.value:
30
30
  value = yield from v._code_repr(context)
@@ -54,7 +54,7 @@ class CustomSet(CustomSequence):
54
54
  braces = "{}"
55
55
  trailing_comma = False
56
56
 
57
- def _code_repr(self, context: AdapterContext) -> Generator[ChangeBase, None, str]:
57
+ def _code_repr(self, context: SnapshotContext) -> Generator[ChangeBase, None, str]:
58
58
  if len(self.value) == 0:
59
59
  return "set()"
60
60
  values = []
@@ -2,9 +2,9 @@ from __future__ import annotations
2
2
 
3
3
  from typing import Generator
4
4
 
5
- from inline_snapshot._adapter_context import AdapterContext
6
- from inline_snapshot._change import ChangeBase
7
- from inline_snapshot._sentinels import undefined
5
+ from inline_snapshot._core._change import ChangeBase
6
+ from inline_snapshot._core._sentinels import undefined
7
+ from inline_snapshot._core._snapshot_context import SnapshotContext
8
8
 
9
9
  from ._custom import Custom
10
10
 
@@ -13,7 +13,7 @@ class CustomUndefined(Custom):
13
13
  def __init__(self):
14
14
  self.value = undefined
15
15
 
16
- def _code_repr(self, context: AdapterContext) -> Generator[ChangeBase, None, str]:
16
+ def _code_repr(self, context: SnapshotContext) -> Generator[ChangeBase, None, str]:
17
17
  yield from ()
18
18
  return "..."
19
19
 
@@ -4,8 +4,8 @@ from dataclasses import dataclass
4
4
  from typing import Any
5
5
  from typing import Generator
6
6
 
7
- from inline_snapshot._adapter_context import AdapterContext
8
- from inline_snapshot._change import ChangeBase
7
+ from inline_snapshot._core._change import ChangeBase
8
+ from inline_snapshot._core._snapshot_context import SnapshotContext
9
9
 
10
10
  from ._custom import Custom
11
11
 
@@ -15,7 +15,7 @@ class CustomUnmanaged(Custom):
15
15
  value: Any
16
16
 
17
17
  def _code_repr(
18
- self, context: AdapterContext
18
+ self, context: SnapshotContext
19
19
  ) -> Generator[ChangeBase, None, str]: # pragma: no cover
20
20
  yield from ()
21
21
  return "'unmanaged'"
@@ -2,9 +2,9 @@ from dataclasses import dataclass
2
2
  from typing import Any
3
3
  from typing import Generator
4
4
 
5
- from inline_snapshot._adapter_context import AdapterContext
6
- from inline_snapshot._change import ChangeBase
7
- from inline_snapshot._customize._custom import Custom
5
+ from inline_snapshot._core._change import ChangeBase
6
+ from inline_snapshot._core._customize._custom import Custom
7
+ from inline_snapshot._core._snapshot_context import SnapshotContext
8
8
 
9
9
 
10
10
  @dataclass(frozen=True, eq=False)
@@ -17,7 +17,7 @@ class Uncustomized(Custom):
17
17
  def _map(self, f):
18
18
  return self._value
19
19
 
20
- def _code_repr(self, context: AdapterContext) -> Generator[ChangeBase, None, str]:
20
+ def _code_repr(self, context: SnapshotContext) -> Generator[ChangeBase, None, str]:
21
21
  assert False
22
22
  return "<uncustomized>"
23
23
  yield