Skip to content

Module omnipy.modules.raw.protocols

Overview

View Source
from typing import Protocol

class IsModifyContentsCallable(Protocol):

    """"""

    def __call__(self, data_file: str, **kwargs: object) -> str:

        ...

class IsModifyEachLineCallable(Protocol):

    """"""

    def __call__(self, line_no: int, line: str, **kwargs: object) -> str:

        ...

class IsModifyAllLinesCallable(Protocol):

    """"""

    def __call__(self, all_lines: list[str], **kwargs: object) -> list[str]:

        ...

Classes

IsModifyAllLinesCallable

class IsModifyAllLinesCallable(
    *args,
    **kwargs
)
View Source
class IsModifyAllLinesCallable(Protocol):

    """"""

    def __call__(self, all_lines: list[str], **kwargs: object) -> list[str]:

        ...

Methods

call
def __call__(
    self,
    all_lines: list[str],
    **kwargs: object
) -> list[str]

Call self as a function.

Parameters:

Name Type Description Default
all_lines list[str]
kwargs object

Returns:

Type Description
list[str]
View Source
    def __call__(self, all_lines: list[str], **kwargs: object) -> list[str]:

        ...

IsModifyContentsCallable

class IsModifyContentsCallable(
    *args,
    **kwargs
)
View Source
class IsModifyContentsCallable(Protocol):

    """"""

    def __call__(self, data_file: str, **kwargs: object) -> str:

        ...

Methods

call
def __call__(
    self,
    data_file: str,
    **kwargs: object
) -> str

Call self as a function.

Parameters:

Name Type Description Default
data_file str
kwargs object

Returns:

Type Description
str
View Source
    def __call__(self, data_file: str, **kwargs: object) -> str:

        ...

IsModifyEachLineCallable

class IsModifyEachLineCallable(
    *args,
    **kwargs
)
View Source
class IsModifyEachLineCallable(Protocol):

    """"""

    def __call__(self, line_no: int, line: str, **kwargs: object) -> str:

        ...

Methods

call
def __call__(
    self,
    line_no: int,
    line: str,
    **kwargs: object
) -> str

Call self as a function.

Parameters:

Name Type Description Default
line_no int
line str
kwargs object

Returns:

Type Description
str
View Source
    def __call__(self, line_no: int, line: str, **kwargs: object) -> str:

        ...