Skip to content

Commit ff0415f

Browse files
committed
Fix __module__ of bound inner classes
A bound inner class should appear to originate in yje same module as the corresponding unbound inner class. I had this lying change around in my working copy and I forgot why I made it. It looks reasonable to me and the tests pass.
1 parent f649290 commit ff0415f

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/bd2k/util/objects.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ def __repr__( self ):
210210
return "%s bound to %s" % (super( BoundInner, self ).__repr__( ), repr( _outer ))
211211

212212
BoundInner.__name__ = self.inner_class.__name__
213+
BoundInner.__module__ = self.inner_class.__module__
213214
return BoundInner
214215

215216
def __call__( *args, **kwargs ):

0 commit comments

Comments
 (0)