Make argument keyword-only

Co-authored-by: Matthew Honnibal <honnibal+gh@gmail.com>
This commit is contained in:
Ines Montani 2020-08-31 15:39:03 +02:00 committed by GitHub
parent 6340d1c63d
commit 83aff38c59
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

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

View File

@ -217,7 +217,7 @@ cdef class PhraseMatcher:
result = internal_node
map_set(self.mem, <MapStruct*>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.