-
-
Notifications
You must be signed in to change notification settings - Fork 80
Closed
Labels
type-bugBug reportBug report
Milestone
Description
ALL software version info
param v1.12.2, Colab notebook
Description of expected behavior and the observed behavior
Simply put, classes with the same name get clobbered in get_concrete_descendents().
I came across this bug when trying to run some unit tests with duplicated code (and class definitions) were in different files.
Complete, minimal, self-contained example code that reproduces the issue
import sys
import param
from param.parameterized import descendents
print(param.__version__)
class A(object):
pass
class B(A):
pass
b = B
print(b in param.concrete_descendents(A).values())
class B(A):
pass
print(b in param.concrete_descendents(A).values(), b in descendents(A))
print(B in param.concrete_descendents(A).values(), B in descendents(A))
print(issubclass(b, A), issubclass(b, A))Metadata
Metadata
Assignees
Labels
type-bugBug reportBug report