(core) Make CONTAINS a function for consistency with mkpydocs etc.

Summary: Having CONTAINS be a class is a pain, undoing that mistake now

Test Plan: none needed

Reviewers: dsagal

Reviewed By: dsagal

Differential Revision: https://phab.getgrist.com/D2929
This commit is contained in:
Alex Hall
2021-07-20 22:57:35 +02:00
parent 1f6e693b6e
commit f5981606e1
5 changed files with 21 additions and 12 deletions

View File

@@ -35,7 +35,7 @@ class AutocompleteContext(object):
# TODO It would be nice to include builtin functions too, but getargspec doesn't work there.
self._functions = {}
for key, value in six.iteritems(self._context):
if value and callable(value) and not isinstance(value, type):
if value and callable(value):
argspec = inspect.formatargspec(*inspect.getargspec(value))
self._functions[key] = Completion(key, argspec, is_grist_func(value))