class documentation

class TreeDepthFilter(FilterSpec):

Constructor: TreeDepthFilter(max_depth)

View In Hierarchy

Filter that excludes trees beyond a specified depth.

Method __init__ Initialize tree depth filter.
Method __repr__ Return string representation of the filter.
Method should_include_blob Include all blobs.
Method should_include_tree Include only trees up to max_depth.
Method to_spec_string Return 'tree:<depth>'.
Instance Variable max_depth Undocumented
def __init__(self, max_depth: int):

Initialize tree depth filter.

Parameters
max_depth:intMaximum tree depth (0 = only root tree)
def __repr__(self) -> str:

Return string representation of the filter.

def should_include_blob(self, blob_size: int) -> bool:
def should_include_tree(self, depth: int) -> bool:

Include only trees up to max_depth.

def to_spec_string(self) -> str:

Return 'tree:<depth>'.

max_depth =

Undocumented