Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions pythonx/compose/_reexport.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
import inspect
import re
import sys
import types
import weakref
from functools import lru_cache
from pathlib import Path
Expand Down Expand Up @@ -214,6 +215,10 @@ def __repr__(self):


def _pythonic(value, name):
if isinstance(value, types.ModuleType):
# A Kotlin object served as a sub-package. Since python-multiplatform #35 the binder lists it
# and exposes it as an attribute of its parent, so the name table reaches it directly.
return KotlinObject(value)
if isinstance(value, type) or not callable(value):
return value
return PythonicFunction(value, name)
Expand Down
Loading