Skip to content

exekall: Look for operators in modules where class attributes are def…

…ined

In addition to recursively looking at modules and their import list, also look at the modules where class attributes are defined.

Otherwise, we can end up in this situation:

module M1: class A: def test_foo(self, x:X=42) ...

def produceX() -> X:
...

module M2: class Derived(A): ...

When pointed at M2, exekall would discover Derived, but would also select Derived.test_foo() since it lists all members of the class. However, if we don't add M1 to the modules to scan, we will never find produceX(), leading to the default value 42 being used.

Merge request reports