How to use the ptpython.filters.PythonInputFilter function in ptpython

To help you get started, we’ve selected a few ptpython examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github prompt-toolkit / ptpython / ptpython / filters.py View on Github external
class PythonInputFilter(Filter):
    def __init__(self, python_input):
        self.python_input = python_input

    def __call__(self):
        raise NotImplementedError


class HasSignature(PythonInputFilter):
    def __call__(self):
        return bool(self.python_input.signatures)


class ShowSidebar(PythonInputFilter):
    def __call__(self):
        return self.python_input.show_sidebar


class ShowSignature(PythonInputFilter):
    def __call__(self):
        return self.python_input.show_signature


class ShowDocstring(PythonInputFilter):
    def __call__(self):
        return self.python_input.show_docstring
github prompt-toolkit / ptpython / ptpython / filters.py View on Github external
'HasSignature',
    'ShowSidebar',
    'ShowSignature',
    'ShowDocstring',
)


class PythonInputFilter(Filter):
    def __init__(self, python_input):
        self.python_input = python_input

    def __call__(self):
        raise NotImplementedError


class HasSignature(PythonInputFilter):
    def __call__(self):
        return bool(self.python_input.signatures)


class ShowSidebar(PythonInputFilter):
    def __call__(self):
        return self.python_input.show_sidebar


class ShowSignature(PythonInputFilter):
    def __call__(self):
        return self.python_input.show_signature


class ShowDocstring(PythonInputFilter):
    def __call__(self):
github prompt-toolkit / ptpython / ptpython / filters.py View on Github external
def __call__(self):
        raise NotImplementedError


class HasSignature(PythonInputFilter):
    def __call__(self):
        return bool(self.python_input.signatures)


class ShowSidebar(PythonInputFilter):
    def __call__(self):
        return self.python_input.show_sidebar


class ShowSignature(PythonInputFilter):
    def __call__(self):
        return self.python_input.show_signature


class ShowDocstring(PythonInputFilter):
    def __call__(self):
        return self.python_input.show_docstring
github prompt-toolkit / ptpython / ptpython / filters.py View on Github external
class HasSignature(PythonInputFilter):
    def __call__(self):
        return bool(self.python_input.signatures)


class ShowSidebar(PythonInputFilter):
    def __call__(self):
        return self.python_input.show_sidebar


class ShowSignature(PythonInputFilter):
    def __call__(self):
        return self.python_input.show_signature


class ShowDocstring(PythonInputFilter):
    def __call__(self):
        return self.python_input.show_docstring