0.1.dev2192+g7c539c3.d20250403

flytekit.tools.ignore

Directory

Classes

Class Description
DockerIgnore Uses docker-py’s PatternMatcher to check whether a path is ignored.
FlyteIgnore Uses a.
GitIgnore Uses git cli (if available) to list all ignored files and compare with those.
Ignore Base for Ignores, implements core logic.
IgnoreGroup Groups multiple Ignores and checks a path against them.
StandardIgnore Retains the standard ignore functionality that previously existed.

Variables

Property Type Description
STANDARD_IGNORE_PATTERNS list

flytekit.tools.ignore.DockerIgnore

Uses docker-py’s PatternMatcher to check whether a path is ignored.

class DockerIgnore(
    root: pathlib._local.Path,
)
Parameter Type
root pathlib._local.Path

Methods

Method Description
is_ignored()
tar_filter()

is_ignored()

def is_ignored(
    path: str,
) -> bool
Parameter Type
path str

tar_filter()

def tar_filter(
    tarinfo: tarfile.TarInfo,
) -> typing.Optional[tarfile.TarInfo]
Parameter Type
tarinfo tarfile.TarInfo

flytekit.tools.ignore.FlyteIgnore

Uses a .flyteignore file to determine ignored files.

class FlyteIgnore(
    root: pathlib._local.Path,
)
Parameter Type
root pathlib._local.Path

Methods

Method Description
is_ignored()
tar_filter()

is_ignored()

def is_ignored(
    path: str,
) -> bool
Parameter Type
path str

tar_filter()

def tar_filter(
    tarinfo: tarfile.TarInfo,
) -> typing.Optional[tarfile.TarInfo]
Parameter Type
tarinfo tarfile.TarInfo

flytekit.tools.ignore.GitIgnore

Uses git cli (if available) to list all ignored files and compare with those.

class GitIgnore(
    root: pathlib._local.Path,
)
Parameter Type
root pathlib._local.Path

Methods

Method Description
is_ignored()
tar_filter()

is_ignored()

def is_ignored(
    path: str,
) -> bool
Parameter Type
path str

tar_filter()

def tar_filter(
    tarinfo: tarfile.TarInfo,
) -> typing.Optional[tarfile.TarInfo]
Parameter Type
tarinfo tarfile.TarInfo

flytekit.tools.ignore.Ignore

Base for Ignores, implements core logic. Children have to implement _is_ignored

class Ignore(
    root: str,
)
Parameter Type
root str

Methods

Method Description
is_ignored()
tar_filter()

is_ignored()

def is_ignored(
    path: str,
) -> bool
Parameter Type
path str

tar_filter()

def tar_filter(
    tarinfo: tarfile.TarInfo,
) -> typing.Optional[tarfile.TarInfo]
Parameter Type
tarinfo tarfile.TarInfo

flytekit.tools.ignore.IgnoreGroup

Groups multiple Ignores and checks a path against them. A file is ignored if any Ignore considers it ignored.

class IgnoreGroup(
    root: str,
    ignores: typing.List[typing.Type[flytekit.tools.ignore.Ignore]],
)
Parameter Type
root str
ignores typing.List[typing.Type[flytekit.tools.ignore.Ignore]]

Methods

Method Description
is_ignored()
list_ignored()
tar_filter()

is_ignored()

def is_ignored(
    path: str,
) -> bool
Parameter Type
path str

list_ignored()

def list_ignored()

tar_filter()

def tar_filter(
    tarinfo: tarfile.TarInfo,
) -> typing.Optional[tarfile.TarInfo]
Parameter Type
tarinfo tarfile.TarInfo

flytekit.tools.ignore.StandardIgnore

Retains the standard ignore functionality that previously existed. Could in theory by fed with custom ignore patterns from cli.

class StandardIgnore(
    root: pathlib._local.Path,
    patterns: typing.Optional[typing.List[str]],
)
Parameter Type
root pathlib._local.Path
patterns typing.Optional[typing.List[str]]

Methods

Method Description
is_ignored()
tar_filter()

is_ignored()

def is_ignored(
    path: str,
) -> bool
Parameter Type
path str

tar_filter()

def tar_filter(
    tarinfo: tarfile.TarInfo,
) -> typing.Optional[tarfile.TarInfo]
Parameter Type
tarinfo tarfile.TarInfo