From 0e7a34412b8836a14849c48b8e89c186c0e7c349 Mon Sep 17 00:00:00 2001 From: Panu Oksiala Date: Thu, 22 May 2025 13:13:49 +0300 Subject: Improve typing --- femtoqueue.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'femtoqueue.py') diff --git a/femtoqueue.py b/femtoqueue.py index 718e824..6b24e56 100644 --- a/femtoqueue.py +++ b/femtoqueue.py @@ -1,4 +1,4 @@ -from os import makedirs, path, listdir, rename, urandom, fsync +from os import makedirs, path, PathLike, listdir, rename, urandom, fsync from dataclasses import dataclass import time from typing import Generator @@ -23,7 +23,7 @@ class FemtoQueue: def __init__( self, - data_dir: str, + data_dir: PathLike, node_id: str, timeout_stale_ms: int = 30_000, sync_after_write: bool = False, @@ -33,7 +33,7 @@ class FemtoQueue: Parameters ---------- - data_dir : str + data_dir : os.PathLike Directory where data files are persisted node_id : str Stable identifier for this instance -- cgit v1.3