Exemplo n.º 1
0
class ModuleFakeClassWithLambdaDecoratedCallables(interoperable_with_metaclass_future(ModuleFakeClass)):

    @(lambda f: lambda self, x, y: f(self, x, y))
    def symbol_of_interest(self, a : int, b : str) -> bool: pass

    @(lambda f: lambda self, x, y: f(self, x, y))
    def non_symbol_of_interest(self, a, b): pass
Exemplo n.º 2
0
class ModuleFakeClassWithCallables(
        interoperable_with_metaclass_future(ModuleFakeClass)):
    def symbol_of_interest(self, a, b):
        pass

    def non_symbol_of_interest(self, a: int, b: str) -> bool:
        pass
Exemplo n.º 3
0
class ModuleFakeClassWithClassesWithNestedAnnotatedCallables(interoperable_with_metaclass_future(ModuleFakeClass)):
    class SymbolOfInterest:
        def symbol_of_interest(self):
            def nested_a(a : int, b : str) -> bool: pass

    class NonSymbolOfInterest:
        def non_symbol_of_interest(self):
            def nested_b(a, b): pass
Exemplo n.º 4
0
class ModuleFakeClassWithNestedAnnotatedFunction(
        interoperable_with_metaclass_future(ModuleFakeClass)):
    def non_symbol_of_interest(self, a: int, b: str) -> bool:
        pass

    def symbol_of_interest(self, a: int, b: str) -> bool:
        def nested(a: int, b: str) -> bool:
            pass
Exemplo n.º 5
0
class ModuleFakeClassWithNestedLambdaDecoratedClasses(interoperable_with_metaclass_future(ModuleFakeClass)):

    def symbol_of_interest(self, a, b):
        # TODO: investigate other ways in which we can retrieve a class, right now it is only if we do a lambda return
        @(lambda c: lambda: None)
        class SymbolOfInterest:
            def symbol_of_interest(self, a: int, b: str) -> bool: pass

    def non_symbol_of_interest(self, a, b): pass
class ModuleFakeClassWithClasses(
        interoperable_with_metaclass_future(ModuleFakeClass)):
    class SymbolOfInterest:
        def symbol_of_interest(self, a, b):
            pass

    class NonSymbolOfInterest:
        def non_symbol_of_interest(self, a: int, b: str) -> bool:
            pass
class ModuleFakeClassWithMixedAnnotatedSymbols(
        interoperable_with_metaclass_future(ModuleFakeClass)):
    def symbol_of_interest(self, a: int, b: str) -> bool:
        class SymbolOfInterest:
            def symbol_of_interest(self, a: int, b: str) -> bool:
                pass

    def non_symbol_of_interest(self, a, b):
        pass
class ModuleFakeClassWithMultiplyDecoratedCallables(
        interoperable_with_metaclass_future(ModuleFakeClass)):
    @decorator
    @decorator2
    @decorator3
    def symbol_of_interest(self, a: int, b: str) -> bool:
        pass

    @decorator
    @decorator2
    @decorator3
    def non_symbol_of_interest(self, a, b):
        pass
class ModuleFakeClassWithMultiplyDecoratedClasses(
        interoperable_with_metaclass_future(ModuleFakeClass)):
    # TODO: investigate other ways in which we can retrieve a class, right now it is only if we do a lambda return
    @decorator1
    @decorator2
    @decorator3
    class SymbolOfInterest:
        def symbol_of_interest(self, a, b):
            pass

    @decorator1
    @decorator2
    @decorator3
    class NonSymbolOfInterest:
        def non_symbol_of_interest(self, a: int, b: str) -> bool:
            pass
class ModuleFakeClassWithCallableAndDefault(interoperable_with_metaclass_future(ModuleFakeClass)):
    def symbol_of_interest(self, a, b = 9): pass
class ModuleFakeClassWithInheritedAnnotatedCallables(interoperable_with_metaclass_future(ModuleFakeClass)):
    class SymbolOfInterest(ModuleFakeClassWithAnnotatedCallables): pass

    class NonSymbolOfInterest:
        def non_symbol_of_interest(self, a : int, b : str) -> bool: pass