Repository navigation
Expand file tree
/
Copy path_pathspec.pyi
More file actions
63 lines (54 loc) · 2.47 KB
/
Copy path_pathspec.pyi
File metadata and controls
63 lines (54 loc) · 2.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
from collections.abc import Iterator, Sequence
from pathlib import Path
from typing import Any, Self
from ._index import IndexEntry, IndexFile
from ._runtime import CancellationToken, Progress
class PathspecPattern:
def is_nil(self) -> bool: ...
def is_excluded(self) -> bool: ...
def always_matches(self) -> bool: ...
def path(self) -> bytes: ...
def prefix_directory(self) -> bytes: ...
def to_bstring(self) -> bytes: ...
def __bytes__(self) -> bytes: ...
class PathspecMatch:
@property
def pattern(self) -> PathspecPattern: ...
@property
def sequence_number(self) -> int: ...
@property
def kind(self) -> str: ...
def is_excluded(self) -> bool: ...
class PathspecPatterns(Iterator[PathspecPattern]):
def __iter__(self) -> Self: ...
def __next__(self) -> PathspecPattern: ...
def close(self) -> None: ...
def __enter__(self) -> Self: ...
def __exit__(self, exc_type: Any, exc: Any, traceback: Any) -> None: ...
class PathspecEntries(Iterator[tuple[bytes, IndexEntry]]):
def __iter__(self) -> Self: ...
def __next__(self) -> tuple[bytes, IndexEntry]: ...
def close(self) -> None: ...
def __enter__(self) -> Self: ...
def __exit__(self, exc_type: Any, exc: Any, traceback: Any) -> None: ...
class PathspecSearch:
def patterns(self) -> PathspecPatterns: ...
def common_prefix(self) -> bytes: ...
def prefix_directory(self) -> Path: ...
def longest_common_directory(self) -> Path | None: ...
class Pathspec:
def search(self) -> PathspecSearch: ...
def pattern_matching_relative_path(self, relative_path: str | bytes, is_dir: bool | None = None) -> PathspecMatch | None: ...
def is_included(self, relative_path: str | bytes, is_dir: bool | None = None) -> bool: ...
def index_entries_with_paths(self, index: IndexFile, *, progress: Progress | None = None, cancel: CancellationToken | None = None) -> PathspecEntries | None: ...
class PathspecDefaults:
@property
def signature(self) -> int: ...
@property
def search_mode(self) -> str: ...
@property
def literal(self) -> bool: ...
class PathspecRepository:
def pathspec(self, empty_patterns_match_prefix: bool, patterns: Sequence[str | bytes], inherit_ignore_case: bool, index: IndexFile, attributes_source: str = "worktree_then_id_mapping") -> Pathspec: ...
def pathspec_defaults(self) -> PathspecDefaults: ...
def pathspec_defaults_inherit_ignore_case(self, inherit_ignore_case: bool) -> PathspecDefaults: ...