Open matthew-brett opened 3 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 92.26%. Comparing base (
c445edd
) to head (251c899
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
- I was considering using OpenDef from
openers.py
, but that is only defined ifty.TYPE_CHECKING
is True. I'd love some advice!
We could pull that out of the ty.TYPE_CHECKING
block. The main point of putting it in there is that it was only used internally and it didn't seem usable at runtime. If you're also only using it as a type annotation, then it will be available to import into other modules like:
if ty.TYPE_CHECKING:
from nibabel.openers import OpenerDef
Allow FileHolder subclasses to change the ImageOpener class.
I wanted to do this to work with the
fsspec
file objects.But - I couldn't see immediately what the right way to do the type checking is
openers.py
, but that is only defined ifty.TYPE_CHECKING
is True. I'd love some advice!