MCPcopy Create free account
hub / github.com/libgit2/pygit2 / check

Method check

pygit2/filter.py:72–87  ·  view source on GitHub ↗

Check whether this filter should be applied to the given source. `check` will be called once per stream. If `Passthrough` is raised, the filter will not be applied. Parameters: src: The source of the filtered blob. attr_values: The values of each

(self, src: FilterSource, attr_values: list[str | None])

Source from the content-addressed store, hash-verified

70 return len(cls.attributes.split())
71
72 def check(self, src: FilterSource, attr_values: list[str | None]) -> None:
73 """
74 Check whether this filter should be applied to the given source.
75
76 `check` will be called once per stream.
77
78 If `Passthrough` is raised, the filter will not be applied.
79
80 Parameters:
81
82 src: The source of the filtered blob.
83
84 attr_values: The values of each attribute for the blob being filtered.
85 `attr_values` will be a sorted list containing attributes in the
86 order they were defined in ``cls.attributes``.
87 """
88
89 def write(
90 self, data: bytes, src: FilterSource, write_next: Callable[[bytes], None]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected