From 1d0164090cf7ce9abd6b96bd113aa4e979da96a7 Mon Sep 17 00:00:00 2001 From: Remi Gau Date: Sat, 10 Aug 2024 20:06:47 +0200 Subject: [PATCH] fix type --- bidsmreye/report.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bidsmreye/report.py b/bidsmreye/report.py index edbca9e..c4123dd 100644 --- a/bidsmreye/report.py +++ b/bidsmreye/report.py @@ -1,7 +1,10 @@ """Compile outputs from all tasks, spaces, runs into a single HTML.""" import datetime +from collections.abc import Iterable +from os import PathLike from pathlib import Path +from typing import Union from jinja2 import Environment, FileSystemLoader, select_autoescape @@ -12,8 +15,10 @@ TEMPLATES_DIR = Path(__file__).parent / "templates" +SearchpathType = str | PathLike[str] | Iterable[str | PathLike[str]] -def return_jinja_env(searchpath: str | Path | None = None) -> Environment: + +def return_jinja_env(searchpath: Union[SearchpathType, None] = None) -> Environment: if searchpath is None: searchpath = TEMPLATES_DIR / "report" return Environment(