class-resolver
class-resolver copied to clipboard
ClassResolver.from_subclasses does not collect __main__ classes
Since ClassResolver.from_subclasses excludes classes from private modules by default, and the name of the module from which a Python script is invoked is replaced by __main__, classes defined there are excluded, since they are considered private as their module name starts with _.
cf. https://github.com/pykeen/pykeen/commit/442e586cb4f2d67b644fde867db91a9819aa507e