only choose the ones that are defined in the same module
This commit is contained in:
parent
397683a9c1
commit
bf1d052795
@ -1506,13 +1506,18 @@ class ImmutableComputedVar(ImmutableVar[RETURN_TYPE]):
|
|||||||
class_where_defined = cast(
|
class_where_defined = cast(
|
||||||
Type[BaseState],
|
Type[BaseState],
|
||||||
min(
|
min(
|
||||||
|
filter(
|
||||||
|
lambda state: state.__module__ == self.fget.__module__,
|
||||||
filter(
|
filter(
|
||||||
is_not_mixin,
|
is_not_mixin,
|
||||||
filter(
|
filter(
|
||||||
lambda state: contains_class_name(inspect.getmro(state)),
|
lambda state: contains_class_name(
|
||||||
|
inspect.getmro(state)
|
||||||
|
),
|
||||||
inspect.getmro(owner),
|
inspect.getmro(owner),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
default=owner,
|
default=owner,
|
||||||
key=length_of_state,
|
key=length_of_state,
|
||||||
),
|
),
|
||||||
|
Loading…
Reference in New Issue
Block a user