Fix bound method autocomplete callbacks not working

This also adds some regression tests
This commit is contained in:
Rapptz
2022-05-09 17:24:48 -04:00
parent b2929513cc
commit 40176bb71b
3 changed files with 134 additions and 5 deletions

View File

@@ -233,8 +233,9 @@ def _validate_auto_complete_callback(
binding = getattr(callback, '__self__', None)
if binding is not None:
callback = callback.__func__
requires_binding = (binding is None and is_inside_class(callback)) or skip_binding
requires_binding = True
else:
requires_binding = is_inside_class(callback) or skip_binding
callback.requires_binding = requires_binding
callback.binding = binding