From d0d1c47d892533a20a6d51274f8959fec8b39ca2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Al=C3=A1n=20Mu=C3=B1oz?= <alan.munoz@ed.ac.uk> Date: Sat, 24 Sep 2022 17:40:24 +0100 Subject: [PATCH] style(abc): isort --- agora/abc.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/agora/abc.py b/agora/abc.py index 2c32876e..9c757809 100644 --- a/agora/abc.py +++ b/agora/abc.py @@ -5,8 +5,8 @@ from copy import copy from pathlib import Path, PosixPath from typing import Union -from yaml import dump, safe_load from flatten_dict import flatten +from yaml import dump, safe_load atomic = t.Union[int, float, str, bool] @@ -84,8 +84,9 @@ class ParametersABC(ABC): try: if Path(source).exists(): is_buffer = False - except Exception: - pass + except Exception as _: + assert isinstance(source, str), "Invalid source type." + if is_buffer: params = safe_load(source) else: -- GitLab