- CachedPath bugfix, try 2

This commit is contained in:
Wim Pomp
2024-04-03 14:32:52 +02:00
parent 6041f8c72e
commit 153355d736
2 changed files with 4 additions and 3 deletions

View File

@@ -2,6 +2,7 @@ from __future__ import annotations
import multiprocessing import multiprocessing
import re import re
import os
import warnings import warnings
from abc import ABC, ABCMeta, abstractmethod from abc import ABC, ABCMeta, abstractmethod
from argparse import ArgumentParser from argparse import ArgumentParser
@@ -12,7 +13,7 @@ from importlib.metadata import version
from itertools import product from itertools import product
from numbers import Number from numbers import Number
from operator import truediv from operator import truediv
from pathlib import Path from pathlib import Path, PosixPath, WindowsPath, PurePath
from traceback import print_exc from traceback import print_exc
from typing import Any, Callable, Mapping, Optional from typing import Any, Callable, Mapping, Optional
@@ -132,7 +133,7 @@ class Shape(tuple):
return tuple(self[i] for i in 'yxczt') # type: ignore return tuple(self[i] for i in 'yxczt') # type: ignore
class CachedPath(type(Path())): class CachedPath(WindowsPath if os.name == 'nt' else PosixPath):
""" helper class for checking whether a file has changed, used by OmeCache """ """ helper class for checking whether a file has changed, used by OmeCache """
def __init__(self, path: Path | str) -> None: def __init__(self, path: Path | str) -> None:

View File

@@ -1,6 +1,6 @@
[tool.poetry] [tool.poetry]
name = "ndbioimage" name = "ndbioimage"
version = "2024.4.1" version = "2024.4.2"
description = "Bio image reading, metadata and some affine registration." description = "Bio image reading, metadata and some affine registration."
authors = ["W. Pomp <w.pomp@nki.nl>"] authors = ["W. Pomp <w.pomp@nki.nl>"]
license = "GPLv3" license = "GPLv3"