From 17789c30a352abe016958f912ca4ebc0e70971de Mon Sep 17 00:00:00 2001 From: Tony-HYX <605698554@qq.com> Date: Tue, 12 Dec 2023 15:25:14 +0800 Subject: [PATCH] [FIX] change "or" to "Union" in type hints --- abl/reasoning/reasoner.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/abl/reasoning/reasoner.py b/abl/reasoning/reasoner.py index ec6f963..ff0bed7 100644 --- a/abl/reasoning/reasoner.py +++ b/abl/reasoning/reasoner.py @@ -1,5 +1,5 @@ import inspect -from typing import Callable, Any, List, Optional +from typing import Callable, Any, List, Optional, Union import numpy as np from zoopt import Dimension, Objective, Opt, Parameter @@ -50,9 +50,9 @@ class Reasoner: def __init__( self, kb: KBBase, - dist_func: str or Callable = "confidence", + dist_func: Union[str, Callable] = "confidence", mapping: Optional[dict] = None, - max_revision: int or float = -1, + max_revision: Union[int, float] = -1, require_more_revision: int = 0, use_zoopt: bool = False, ):