Don't use __code__
__code__ is a special method name used by python already source: https://docs.python.org/3/reference/datamodel.html#special-method-names
This commit is contained in:
@@ -98,7 +98,7 @@ class IResolver:
|
||||
if obj:
|
||||
obj[0].__file__ = str(entry)
|
||||
if add_source:
|
||||
obj[0].__code__ = obj[1]
|
||||
obj[0].__source__ = obj[1]
|
||||
return (obj[0], module_path)
|
||||
return (None, None)
|
||||
|
||||
|
Reference in New Issue
Block a user