Repository navigation
Allow None for annotations without notes in wrann - #614
Merged
Merged
Conversation
TheNetherWatcher
force-pushed
the
wrann-aux-note-none
branch
from
October 31, 2026 18:32
791e492 to
0a899c9
Compare
The docstring says aux_note can hold None for annotations without a note, and compact_fields already writes None like an empty string, but check_field rejected it with a TypeError.
TheNetherWatcher
force-pushed
the
wrann-aux-note-none
branch
from
October 31, 2026 18:43
0a899c9 to
0e5728f
Compare
tompollard
approved these changes
Oct 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Found by @tompollard while reviewing #605.
The
wranndocstring (and theAnnotationexample) say an aux note can beNonefor annotations without a note, butNonewas rejected:compact_fieldsalready turns empty notes intoNonebefore writing, so the writer handlesNone. Onlycheck_fieldrejected it. It now skipsNoneinaux_note, soNoneis written exactly like""(byte-identical files), andrdannreads both back as"". I kept the docstring as it is, since it already describes this.Tests:
Noneand""notes give byte-identical files, and read back as"". The test fails onmain.pytest -m "not network"passes (100 tests), and the docs build passes.