confight
confight copied to clipboard
Giv full controll of the stream to the loaders
The file loaders get passed a stream object that was opened by confight.
When overriding a loader for a given format, this might be an issue if the stream is expected to be opened with specific options, or even if the underlying loader implementation doesn’t accept a stream (e.g. only a file path).
Example: tomllib.load() expects the stream to be opened in rb mode, but confight passes a stream opened in r mode to the loader.