uktrade / stream-zip

Python function to construct a ZIP archive on the fly
https://stream-zip.docs.trade.gov.uk/
MIT License
111 stars 9 forks source link

feat: a Method has a clearer definition (that passes strict type checking) #125

Closed michalc closed 5 months ago

michalc commented 5 months ago

Each "Method" now derives from a base class, that has a "get" function to get the internal tuple that controls its file's behaviour. This makes it possible for the same class to both have such a method, and be callable to get a different method, which is how the current NOCOMPRESSION* types work as methods but also as a callable to return a different method.

(Maybe this can be turned into a Protocol in future changes)