Skip to content

Handle strings and bytes in empty - #192

Open
agammann wants to merge 1 commit into
Suor:masterfrom
agammann:fix-empty-text-collections
Open

agammann wants to merge 1 commit into
Suor:masterfrom
agammann:fix-empty-text-collections

Conversation

@agammann

Copy link
Copy Markdown

empty() raises TypeError for strings and bytes because their collection factory is join, which requires an argument. Construct empty text values directly, preserving their type.

Add cases for empty and nonempty strings and bytes. All four fail before the fix; the full suite passes afterward on Python 3.12 (245 tests, warnings treated as errors). Both repository flake8 checks pass.

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.

1 participant