From 380f69da96a4cfd62d7d8946e1960d700532db39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guilhem=20Faur=C3=A9?= Date: Tue, 16 May 2023 16:23:42 +0200 Subject: [PATCH] fixes for pypy --- spip2md/config.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/spip2md/config.py b/spip2md/config.py index ae9b602..4c575c4 100644 --- a/spip2md/config.py +++ b/spip2md/config.py @@ -1,8 +1,9 @@ # pyright: strict from os.path import isfile +from typing import Optional -from yaml import CLoader as Loader -from yaml import load +# from yaml import CLoader as Loader +from yaml import Loader, load config_paths = ("spip2md.yml", "spip2md.yaml") @@ -15,7 +16,7 @@ class Configuration: output_dir = "output" default_export_nb = 1000 - def __init__(self, config_file: str | None = None) -> None: + def __init__(self, config_file: Optional[str] = None) -> None: if config_file is not None: with open(config_file) as f: config = load(f.read(), Loader=Loader)