stubs and pi files seem very similar
here’s an example of a pi file (IronPython.Runtime.Binding.pi):
# coding: utf-8
# AUTO-GENERATED FILE -- DO NOT EDIT
""" NamespaceTracker represent a CLS namespace.
"""
class ContextArgBuilder(ArgBuilder):
""" ArgBuilder which provides the CodeContext parameter to a method.
ContextArgBuilder(info: ParameterInfo)
"""
ConsumedArgumentCount = property(None, None, None,
""" Get: ConsumedArgumentCount(self: ContextArgBuilder) -> int
"""
)
Priority = property(None, None, None,
""" Get: Priority(self: ContextArgBuilder) -> int
"""
)
def ReferenceEquals(self, arg0, arg1):
""" ReferenceEquals(objA: object, objB: object) -> bool
Determines whether the specified System.Object instances are the same instance.
objA: The first object to compare.
objB: The second object to compare.
Returns: ue if objA is the same instance as objB or if both are null; otherwise, lse.
"""
return None
def ToExpression(self, arg0, arg1, arg2, arg3=None):
""" ToExpression(self: ContextArgBuilder, resolver: OverloadResolver, args: RestrictedArguments, hasBeenUsed: Array[bool]) -> Expression
"""
return None
class IPythonExpandable:
""" Interface used to mark objects which contain a dictionary of custom attributes that shadow
their existing attributes in a dynamic fashion.
"""
Context = property(None, None, None,
""" Get: Context(self: IPythonExpandable) -> CodeContext
"""
)
CustomAttributes = property(None, None, None,
""" Get: CustomAttributes(self: IPythonExpandable) -> IDictionary[str, object]
"""
)
def EnsureCustomAttributes(self):
""" EnsureCustomAttributes(self: IPythonExpandable) -> IDictionary[str, object]
Ensures that a non-null IDictionary instance is created for CustomAttributes and
returns it.
"""
import System.Collections.Generic
return System.Collections.Generic.IDictionary`2()
class MetaExpandable(DynamicMetaObject):
""" MetaExpandable[T](parameter: Expression, value: IPythonExpandable)
"""
def BindDeleteMember(self, binder):
""" BindDeleteMember(self: MetaExpandable[T], binder: DeleteMemberBinder) -> DynamicMetaObject
"""
import System.Dynamic
return System.Dynamic.DynamicMetaObject()
def BindGetMember(self, binder):
""" BindGetMember(self: MetaExpandable[T], binder: GetMemberBinder) -> DynamicMetaObject
"""
import System.Dynamic
return System.Dynamic.DynamicMetaObject()
def BindInvokeMember(self, binder, args):
""" BindInvokeMember(self: MetaExpandable[T], binder: InvokeMemberBinder, args: Array[DynamicMetaObject]) -> DynamicMetaObject
"""
import System.Dynamic
return System.Dynamic.DynamicMetaObject()
def BindSetMember(self, binder, value):
""" BindSetMember(self: MetaExpandable[T], binder: SetMemberBinder, value: DynamicMetaObject) -> DynamicMetaObject
"""
import System.Dynamic
return System.Dynamic.DynamicMetaObject()
def Create(self, arg0, arg1):
""" Create(value: object, expression: Expression) -> DynamicMetaObject
Creates a meta-object for the specified object.
value: The object to get a meta-object for.
expression: The expression representing this System.Dynamic.DynamicMetaObject during the dynamic
binding process.
Returns: If the given object implements System.Dynamic.IDynamicMetaObjectProvider and is not a
remote object from outside the current AppDomain, returns the object's specific
meta-object returned by
System.Dynamic.IDynamicMetaObjectProvider.GetMetaObject(System.Linq.Expressions.Expression
). Otherwise a plain new meta-object with no restrictions is created and returned.
"""
return None
EmptyMetaObjects = None
def GetDynamicMemberNames(self):
""" GetDynamicMemberNames(self: MetaExpandable[T]) -> IEnumerable[str]
"""
import System.Collections.Generic
return System.Collections.Generic.IEnumerable`1()
def ReferenceEquals(self, arg0, arg1):
""" ReferenceEquals(objA: object, objB: object) -> bool
Determines whether the specified System.Object instances are the same instance.
objA: The first object to compare.
objB: The second object to compare.
Returns: ue if objA is the same instance as objB or if both are null; otherwise, lse.
"""
return None
Value = property(None, None, None,
class SiteLocalStorageBuilder(ArgBuilder):
""" SiteLocalStorageBuilder(info: ParameterInfo)
"""
ConsumedArgumentCount = property(None, None, None,
""" Get: ConsumedArgumentCount(self: SiteLocalStorageBuilder) -> int
"""
)
Priority = property(None, None, None,
""" Get: Priority(self: SiteLocalStorageBuilder) -> int
"""
)
def ReferenceEquals(self, arg0, arg1):
""" ReferenceEquals(objA: object, objB: object) -> bool
Determines whether the specified System.Object instances are the same instance.
objA: The first object to compare.
objB: The second object to compare.
Returns: ue if objA is the same instance as objB or if both are null; otherwise, lse.
"""
return None
def ToExpression(self, arg0, arg1, arg2, arg3=None):
""" ToExpression(self: SiteLocalStorageBuilder, resolver: OverloadResolver, args: RestrictedArguments, hasBeenUsed: Array[bool]) -> Expression
"""
return None