Version 5.0.0
What's Changed
Version 5.0.0 now type-checks with strict mypy and distributes type stubs!
Version 5 includes a number of breaking changes in order to make this work:
- It is no longer possible to give a
dictas input to write. This is in order to be consistent
with theIterabletype. Before you could write
resfo.write(
"my_grid.fegrid",
{"FILEHEAD": [1], "GRIDHEAD": [10,10,10]},
fileformat=resfo.Format.FORMATTED
)However, since dict is an iterable, this does not work well with types. Instead you will now explicitly call items on the dictionary:
resfo.write(
"my_grid.fegrid",
{"FILEHEAD": [1], "GRIDHEAD": [10,10,10]}.items(),
fileformat=resfo.Format.FORMATTED
)-
The sentinel value
Messis now of typeMessTypeso that checking for the value
should be done asif isinstance(x, MessType)rather thanif x is MESS. Although both
produces the same behavior, only the second type checks correctly. -
resfo no longer supports python 3.8 & python 3.9.
bug fixes
- Raise resfo.ResfoParsingError when eof is reached while reading an Array rather than ValueError.
Full Changelog: v4.3.0...v5.0.0-b0