class documentation

A single ignore pattern.

Method __bytes__ Return the pattern as bytes.
Method __eq__ Check equality with another Pattern object.
Method __init__ Initialize a Pattern object.
Method __repr__ Return a string representation of the Pattern object.
Method __str__ Return the pattern as a string.
Method match Try to match a path against this ignore pattern.
Instance Variable ignorecase Undocumented
Instance Variable is_directory_only Undocumented
Instance Variable is_exclude Undocumented
Instance Variable pattern Undocumented
Instance Variable _re Undocumented
def __bytes__(self) -> bytes:

Return the pattern as bytes.

Returns
bytesThe original pattern as bytes.
def __eq__(self, other: object) -> bool:

Check equality with another Pattern object.

Parameters
other:objectThe object to compare with.
Returns
boolTrue if patterns and ignorecase flags are equal, False otherwise.
def __init__(self, pattern: bytes, ignorecase: bool = False):

Initialize a Pattern object.

Parameters
pattern:bytesThe gitignore pattern as bytes.
ignorecase:boolWhether to perform case-insensitive matching.
def __repr__(self) -> str:

Return a string representation of the Pattern object.

Returns
strA string representation for debugging.
def __str__(self) -> str:

Return the pattern as a string.

Returns
strThe pattern decoded as a string.
def match(self, path: bytes) -> bool:

Try to match a path against this ignore pattern.

Returns: boolean

Parameters
path:bytesPath to match (relative to ignore location)
Returns
boolUndocumented
ignorecase =

Undocumented

is_directory_only =

Undocumented

is_exclude: bool =

Undocumented

pattern =

Undocumented

_re =

Undocumented