From 97d7fbbe4af2f5693af0150d415232ae5e98f898 Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Mon, 21 Aug 2023 11:34:52 -0400 Subject: [PATCH] Constrain `ValidationResult.graph` type to `pyshacl.validate(...)[1]` type Signed-off-by: Alex Nelson --- case_utils/case_validate/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/case_utils/case_validate/__init__.py b/case_utils/case_validate/__init__.py index 1c29d6a..b1283c3 100644 --- a/case_utils/case_validate/__init__.py +++ b/case_utils/case_validate/__init__.py @@ -37,7 +37,7 @@ import os import sys import warnings -from typing import Any, Dict, List, Optional, Set, Tuple, Union +from typing import Dict, List, Optional, Set, Tuple, Union import pyshacl # type: ignore import rdflib @@ -69,7 +69,7 @@ class ValidationResult: def __init__( self, conforms: bool, - graph: Any, + graph: Union[Exception, bytes, str, rdflib.Graph], text: str, undefined_concepts: Set[rdflib.URIRef], ) -> None: