3737
3838
3939def exclude_untracked_files (path : str ) -> None :
40- global DEFAULT_EXCLUDE_EXTENSION_FILES
4140 try :
4241 cmd_result = subprocess .check_output (['git' , 'ls-files' , '-o' ], universal_newlines = True )
4342 cmd_result = cmd_result .split ('\n ' )
@@ -51,7 +50,6 @@ def exclude_untracked_files(path: str) -> None:
5150
5251
5352def exclude_gitignore_files (path : str ) -> None :
54- global DEFAULT_EXCLUDE_EXTENSION_FILES
5553 try :
5654 root_path = VCSStrategyGit .find_root (os .getcwd ())
5755 if root_path :
@@ -89,7 +87,6 @@ def exclude_git_related_files(path: str) -> None:
8987
9088
9189def find_oss_pkg_info_and_exclude_file (path : str , abs_path_to_exclude : List ) -> List [str ]:
92- global DEFAULT_EXCLUDE_EXTENSION_FILES
9390 oss_pkg_info = []
9491 git_present = shutil .which ("git" )
9592
@@ -140,7 +137,6 @@ def find_oss_pkg_info_and_exclude_file(path: str, abs_path_to_exclude: List) ->
140137
141138
142139def create_reuse_dep5_file (path : str ) -> Tuple [bool , str , str ]:
143- global DEFAULT_EXCLUDE_EXTENSION_FILES
144140 # Create .reuse/dep5 for excluding directories from reuse.
145141 _DEFAULT_CONFIG_PREFIX = "Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/\n Upstream-Name: \
146142 reuse\n Upstream-Contact: Carmen Bianca Bakker <[email protected] >\n Source: https://github.com/fsfe/reuse-tool\n "@@ -201,8 +197,6 @@ def remove_reuse_dep5_file(
201197
202198
203199def precheck_for_files (path : str , files : List [str ]) -> Tuple [List [str ], List [str ], Project ]:
204- global DEFAULT_EXCLUDE_EXTENSION_FILES
205-
206200 missing_license_list = []
207201 missing_copyright_list = []
208202
@@ -287,7 +281,6 @@ def filter_missing_list(missing_list: List[str], abs_path_to_exclude: List) -> L
287281
288282
289283def dump_error_msg (error_msg : str , exit = False ) -> None :
290- global error_items
291284 error_items .append (error_msg )
292285 if exit :
293286 logger .error (error_msg )
0 commit comments