11import argparse
2- from typing import Any , Optional , Tuple , List , Generator , Dict
2+ from typing import Any , Dict , Iterator , List , Optional , Tuple
33
4- def find_locale_dir (): ...
4+ from _typeshed import Incomplete
55
66TRANSLATION_CATALOG : Any
77MODULE_NAME : Any
@@ -15,8 +15,6 @@ HASH_BLOCK_SIZE: Any
1515open_text_file : Any
1616UNICODE_BYTE_ORDER_MARK : str
1717
18- def make_bag (bag_dir : Any , bag_info : Optional [Any ] = ..., processes : int = ..., checksums : Optional [Any ] = ..., checksum : Optional [Any ] = ..., encoding : str = ...): ...
19-
2018class Bag :
2119 valid_files : Any = ...
2220 valid_directories : Any = ...
@@ -30,68 +28,23 @@ class Bag:
3028 path : Any = ...
3129 def __init__ (self , path : Optional [Any ] = ...) -> None : ...
3230 @property
33- def algs (self ): ...
31+ def algs (self ) -> List [ str ] : ...
3432 @property
35- def version (self ): ...
36- def manifest_files (self ) -> None : ...
33+ def version (self ) -> str : ...
34+ def manifest_files (self ) -> Iterator [ str ] : ...
3735 def tagmanifest_files (self ) -> None : ...
3836 def compare_manifests_with_fs (self ) -> Tuple [List [str ], List [str ]]: ...
39- def compare_fetch_with_fs (self ): ...
40- def payload_files (self ) -> None : ...
41- def payload_entries (self ): ...
37+ def compare_fetch_with_fs (self ) -> List [ str ] : ...
38+ def payload_files (self ) -> Iterator [ str ] : ...
39+ def payload_entries (self ) -> Dict [ str , str ] : ...
4240 def save (self , processes : int = ..., manifests : bool = ...) -> None : ...
43- def tagfile_entries (self ): ...
44- def missing_optional_tagfiles (self ) -> Generator [str , None , None ]: ...
45- def fetch_entries (self ) -> None : ...
46- def files_to_be_fetched (self ) -> None : ...
41+ def tagfile_entries (self ) -> Dict [ str , str ] : ...
42+ def missing_optional_tagfiles (self ) -> Iterator [str ]: ...
43+ def fetch_entries (self ) -> Iterator [ Tuple [ str , str , str ]] : ...
44+ def files_to_be_fetched (self ) -> Iterator [ str ] : ...
4745 def has_oxum (self ) -> bool : ...
48- def validate (self , processes : int = ..., fast : bool = ..., completeness_only : bool = ...): ...
49- def is_valid (self , fast : bool = ..., completeness_only : bool = ...): ...
46+ def validate (
47+ self , processes : int = ..., fast : bool = ..., completeness_only : bool = ...
48+ ) -> bool : ...
49+ def is_valid (self , fast : bool = ..., completeness_only : bool = ...) -> bool : ...
5050 def validate_fetch (self ) -> None : ...
51-
52- class BagError (Exception ): ...
53-
54- class BagValidationError (BagError ):
55- message : Any = ...
56- details : Any = ...
57- def __init__ (self , message : Any , details : Optional [Any ] = ...) -> None : ...
58-
59- class ManifestErrorDetail (BagError ):
60- path : Any = ...
61- def __init__ (self , path : Any ) -> None : ...
62-
63- class ChecksumMismatch (ManifestErrorDetail ):
64- path : Any = ...
65- algorithm : Any = ...
66- expected : Any = ...
67- found : Any = ...
68- def __init__ (self , path : Any , algorithm : Optional [Any ] = ..., expected : Optional [Any ] = ..., found : Optional [Any ] = ...) -> None : ...
69-
70- class FileMissing (ManifestErrorDetail ): ...
71- class UnexpectedFile (ManifestErrorDetail ): ...
72-
73- class FileNormalizationConflict (BagError ):
74- file_a : Any = ...
75- file_b : Any = ...
76- def __init__ (self , file_a : Any , file_b : Any ) -> None : ...
77-
78- def posix_multiprocessing_worker_initializer () -> None : ...
79- def normalize_unicode_py3 (s : Any ): ...
80- def normalize_unicode_py2 (s : Any ): ...
81- normalize_unicode = normalize_unicode_py3
82-
83- def build_unicode_normalized_lookup_dict (filenames : Any ): ...
84- def get_hashers (algorithms : Any ): ...
85- def make_manifests (data_dir : Any , processes : Any , algorithms : Any = ..., encoding : str = ...): ...
86- def generate_manifest_lines (filename : Any , algorithms : Any = ...): ...
87- def force_unicode_py2 (s : Any ): ...
88- force_unicode = str
89-
90- class BagArgumentParser (argparse .ArgumentParser ):
91- bag_info : Any = ...
92- def __init__ (self , * args : Any , ** kwargs : Any ) -> None : ...
93-
94- class BagHeaderAction (argparse .Action ):
95- def __call__ (self , parser : Any , _ : Any , values : Any , option_string : Optional [Any ] = ...) -> None : ...
96-
97- def main () -> None : ...
0 commit comments