MCPcopy Create free account
hub / github.com/pytest-dev/pytest / __init__

Method __init__

testing/test_argcomplete.py:38–44  ·  view source on GitHub ↗
(self, allowednames=(), directories=True)

Source from the content-addressed store, hash-verified

36 """File completer class, optionally takes a list of allowed extensions."""
37
38 def __init__(self, allowednames=(), directories=True):
39 # Fix if someone passes in a string instead of a list
40 if type(allowednames) is str:
41 allowednames = [allowednames]
42
43 self.allowednames = [x.lstrip("*").lstrip(".") for x in allowednames]
44 self.directories = directories
45
46 def __call__(self, prefix, **kwargs):
47 completion = []

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected