-
Notifications
You must be signed in to change notification settings - Fork 2
Include Integra XML definition files in package #52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,7 +11,7 @@ class SingleFileXmlSnapshot(SingleFileSnapshotExtension): | |
| _write_mode = ( | ||
| WriteMode.TEXT | ||
| ) # for some reason the default is binary, but it should be text to make diffs easier to read | ||
| _file_extension = "xml" | ||
| file_extension = "xml" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chainVerify attribute name change aligns with syrupy 5.0.0 API. This change from Search the web for syrupy 5.0.0 API documentation: Additionally, check the syrupy source code: 🏁 Script executed: #!/bin/bash
# Description: Check if file_extension needs to be public in syrupy 5.x
# Search for how file_extension is used in test files
echo "=== Checking file_extension usage ==="
rg -n --type=py 'file_extension' tests/
# Look for similar snapshot extension patterns in the codebase
echo "=== Checking for other snapshot extensions ==="
ast-grep --pattern $'class $_ (SingleFileSnapshotExtension):
$$$
'Length of output: 494 🌐 Web query: 💡 Result: Short answer: No — SingleFileSnapshotExtension expects the (protected) _file_extension attribute (as used in the docs and examples). See the issue showing subclasses overriding _file_extension (and the subsequent fix for multi-part extensions). [1][2] Sources:
Override protected 🤖 Prompt for AI Agents
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is the correct syntax for the new v5 of syrupy There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🌐 Web query: 💡 Result: Short answer: there is no Syrupy 5.0.0 breaking change that removes the file‑extension attribute from SingleFileSnapshotExtension. The SingleFile extensions still expect/allow an internal _file_extension override (and historically used that private attribute), and support for multi‑part extensions (e.g. "png.zip") was added in an earlier fix. See: [CHANGELOG / v4.9.x], issue about multi‑part extensions (fixed/merged), and the SingleFile behavior discussion. [1][2][3] Sources:
🌐 Web query: 💡 Result: Summary of Syrupy 5.0.0 — key release / migration notes (v4 → v5)
What changed (high‑level)
Migration checklist (v4 → v5)
If you want, I can:
Sources
🏁 Script executed: Length of output: 779 @ejfine, thank you for the clarification! I appreciate you confirming that ✏️ Learnings added
|
||
|
|
||
|
|
||
| @pytest.fixture | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing underscore prefix. The property should be
_file_extensionto match the naming convention of other private properties in this class like_write_mode.