Update spacy/util.py

Co-authored-by: Matthew Honnibal <honnibal+gh@gmail.com>
This commit is contained in:
Ines Montani 2020-08-29 13:17:06 +02:00 committed by GitHub
parent cad988da7f
commit 5de3f8604d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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(