From 83aff38c59a638a795a154c51a25de3f98558a31 Mon Sep 17 00:00:00 2001 From: Ines Montani Date: Mon, 31 Aug 2020 15:39:03 +0200 Subject: [PATCH] Make argument keyword-only Co-authored-by: Matthew Honnibal --- spacy/matcher/matcher.pyx | 2 +- spacy/matcher/phrasematcher.pyx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spacy/matcher/matcher.pyx b/spacy/matcher/matcher.pyx index fdce7e9fa..ee8efd688 100644 --- a/spacy/matcher/matcher.pyx +++ b/spacy/matcher/matcher.pyx @@ -203,7 +203,7 @@ cdef class Matcher: else: yield doc - def __call__(self, object doclike, as_spans=False): + def __call__(self, object doclike, *, as_spans=False): """Find all token sequences matching the supplied pattern. doclike (Doc or Span): The document to match over. diff --git a/spacy/matcher/phrasematcher.pyx b/spacy/matcher/phrasematcher.pyx index 6658c713e..44dda115b 100644 --- a/spacy/matcher/phrasematcher.pyx +++ b/spacy/matcher/phrasematcher.pyx @@ -217,7 +217,7 @@ cdef class PhraseMatcher: result = internal_node map_set(self.mem, result, self.vocab.strings[key], NULL) - def __call__(self, doc, as_spans=False): + def __call__(self, doc, *, as_spans=False): """Find all sequences matching the supplied patterns on the `Doc`. doc (Doc): The document to match over.