Repository navigation
Commit 16cdedd
authored
Drop pynwb < 3.1 compatibility code from pynwb_utils
The declared floor is pynwb >= 3.1.0 (and nwbinspector >= 0.7.0 requires
pynwb >= 3.1 anyway), which makes several version guards unreachable:
- validate(): only the `pynwb.validate(path=...)` branch (pynwb >= 3.0) can
run; the `paths=[...]` tuple-returning form (2.2 to 2.x) and the
`io=` fallback for even older releases are gone.
- copy_nwb_file(): `cache_spec` has been accepted by `export()` since
pynwb 2.8.2, so pass it unconditionally.
- _get_external_images(): `ExternalImage` exists in every supported
pynwb, so import it at module level instead of guarding an ImportError.
The now-unused `packaging.version.Version` import is removed as well.
The NWB *schema* version checks (e.g. the < 2.1.0 error filter) are about
the file being validated, not about pynwb, and are unchanged.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HFhMPs6vF5zyeHDvPTvRcA1 parent 540c7c0 commit 16cdedd
1 file changed
Lines changed: 7 additions & 23 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | 30 | | |
32 | 31 | | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
450 | 450 | | |
451 | 451 | | |
452 | 452 | | |
453 | | - | |
454 | | - | |
455 | | - | |
456 | | - | |
457 | | - | |
458 | | - | |
459 | 453 | | |
460 | 454 | | |
461 | 455 | | |
| |||
685 | 679 | | |
686 | 680 | | |
687 | 681 | | |
688 | | - | |
689 | | - | |
690 | | - | |
691 | | - | |
692 | | - | |
693 | | - | |
694 | | - | |
695 | | - | |
696 | | - | |
697 | | - | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
698 | 685 | | |
699 | 686 | | |
700 | 687 | | |
| |||
808 | 795 | | |
809 | 796 | | |
810 | 797 | | |
811 | | - | |
812 | | - | |
813 | | - | |
814 | | - | |
815 | | - | |
816 | 798 | | |
817 | 799 | | |
818 | 800 | | |
819 | 801 | | |
820 | 802 | | |
821 | 803 | | |
822 | | - | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
823 | 807 | | |
824 | 808 | | |
825 | 809 | | |
| |||
0 commit comments