Skip to content

Conversation

@ndevenish
Copy link
Collaborator

No description provided.

This is used in several places. Annotate, but also make explicitly handle
pathlib.Path objects, including returning a Path if the function is passed a
Path in the first place.

Technically there is a minor change in the outer API: Previously, if the
function was passed None as the path=, it would change the return type to
"" (empty string). Now, passing None is forbidden by the type annotations - but
if a None is passed in anyway, it will return None (the same type).
In process of annotating, found several functions with unnecessarily
packed arguments or with disused arguments. This removes those to tidy.

Also, factor out some common format class logic.
And, reload that class on deserialization. At the moment, this doesn't validate that
the behaviour of everything else under check_format conditions makes sense.
This should mean that any need for check_format will go away - because unless you try to
access the data, the file will not be touched.

Heavily WIP, specific known things to be done:
- Pickle support, as these will probably be sent across process boundaries
- Exhaustive testing
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.

2 participants