Skip to content

Add __delitem__ method to AsdfFile#2008

Merged
sydduckworth merged 4 commits intoasdf-format:mainfrom
sydduckworth:asdffile_impl_delitem
Mar 24, 2026
Merged

Add __delitem__ method to AsdfFile#2008
sydduckworth merged 4 commits intoasdf-format:mainfrom
sydduckworth:asdffile_impl_delitem

Conversation

@sydduckworth
Copy link
Copy Markdown
Contributor

@sydduckworth sydduckworth commented Mar 24, 2026

Description

  • Added __delitem__ magic method to AsdfFile class in _asdf.py
  • Expanded test_top_level_tree test in test_api.py to verify that del file[key] works as expected.

Closes #1874

Tasks

  • run pre-commit on your machine
  • run pytest on your machine
  • Does this PR add new features and / or change user-facing code / API? (if not, label with no-changelog-entry-needed)
    • write news fragment(s) in changes/: echo "changed something" > changes/<PR#>.<changetype>.rst (see below for change types)
    • update relevant docstrings and / or docs/ page
    • for any new features, add unit tests
news fragment change types...
  • changes/<PR#>.feature.rst: new feature
  • changes/<PR#>.bugfix.rst: bug fix
  • changes/<PR#>.doc.rst: documentation change
  • changes/<PR#>.removal.rst: deprecation or removal of public API
  • changes/<PR#>.general.rst: infrastructure or miscellaneous change

@sydduckworth sydduckworth requested a review from a team as a code owner March 24, 2026 20:31
@sydduckworth sydduckworth requested a review from braingram March 24, 2026 20:33
Copy link
Copy Markdown
Contributor

@braingram braingram left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Looks good to me. Feel free to merge at your convenience or let me know if the button isn't green for you.

@sydduckworth sydduckworth merged commit 64eb0eb into asdf-format:main Mar 24, 2026
44 checks passed
@@ -0,0 +1 @@
Added ``__delitem__`` method to `AsdfFile`.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

neat, I never thought to link to automodapi in the changelog, that's really useful
Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AsdfFile does not implement __delitem__

3 participants