From 5de3f8604d27d836be1f64f59bcbaadbea3217f8 Mon Sep 17 00:00:00 2001 From: Ines Montani Date: Sat, 29 Aug 2020 13:17:06 +0200 Subject: [PATCH] Update spacy/util.py Co-authored-by: Matthew Honnibal --- spacy/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacy/util.py b/spacy/util.py index 149bbb21a..bb7d13baf 100644 --- a/spacy/util.py +++ b/spacy/util.py @@ -689,7 +689,7 @@ def is_same_func(func1: Callable, func2: Callable) -> bool: same_name = func1.__qualname__ == func2.__qualname__ same_file = inspect.getfile(func1) == inspect.getfile(func2) same_code = inspect.getsourcelines(func1) == inspect.getsourcelines(func2) - return all([same_name, same_file, same_code]) + return same_name and same_file and same_code def get_cuda_stream(