Skip to content
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

None returning dumper #642

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

None returning dumper #642

wants to merge 9 commits into from

Conversation

dvarrazzo
Copy link
Member

This branch was created a few months ago, now it's probably stale and needs to be rebased on master. There might be some types missing (numpy types were probably added afterwards) needing the same treatment.

Close #377

We missed to reset the number of chars to escape at every field. As a
consequence, we end up resizing and scanning all the fields after the
first one requiring an escape and allocating a bit more memory than
needed.
These are only the changes suggested by Mypy; no test added to verify
that the code paths actually work.

Only Python test fixed, no C yet.
Even if these classes never return None, this allows to create
subclasses returning None without making Mypy unhappy.

Similarly, annotate quote() methods as returning Buffer to allow
subclasses to return other types.
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.

Cannot handle None in custom data dumper
1 participant