From 51f53c3f6a8fdc4e1ca4d0bca6f079ea5214471a Mon Sep 17 00:00:00 2001 From: Carlos Vega <carlos.vega@uni.lu> Date: Tue, 19 Nov 2019 15:00:27 +0100 Subject: [PATCH] fix default value for types --- biokb/biokb.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/biokb/biokb.py b/biokb/biokb.py index 444563a..6efbc01 100644 --- a/biokb/biokb.py +++ b/biokb/biokb.py @@ -1,5 +1,5 @@ from typing import List -from utils import uri_to_entity_code, standarise_underscored_entity_code +from .utils import uri_to_entity_code, standarise_underscored_entity_code from interface.TextMiningService import TextMiningService from models.publication import Publication from models.coocurrence import CoOccurrence @@ -58,7 +58,10 @@ class BioKBservice(TextMiningService): return values - def get_co_occurrences(self, entity: str, limit: int = 20, types: List[str] = []) -> List[CoOccurrence]: + def get_co_occurrences(self, entity: str, limit: int = 20, types: List[str] = None) -> List[CoOccurrence]: + + if types is None: + types = [] entity_types_filter = '' if len(types) > 0: -- GitLab