4747
4848
4949class sdist_files_from_git (sdist ):
50- def get_file_list (self ):
50+ def get_file_list (self ) -> None :
5151 popen = Popen (
5252 ['git' , 'ls-files' ], stdout = PIPE , stderr = PIPE , universal_newlines = True
5353 )
@@ -56,7 +56,7 @@ def get_file_list(self):
5656 print (stderrdata )
5757 sys .exit ()
5858
59- def exclude (line ) :
59+ def exclude (line : str ) -> bool :
6060 for prefix in ['.' , 'appveyor.yml' , 'docs/' , 'misc/' ]:
6161 if line .startswith (prefix ):
6262 return True
@@ -97,11 +97,11 @@ def exclude(line):
9797
9898# On Windows, we install the git2.dll too.
9999class BuildWithDLLs (build ):
100- def _get_dlls (self ):
100+ def _get_dlls (self ) -> list [ tuple [ Path , Path ]] :
101101 # return a list of (FQ-in-name, relative-out-name) tuples.
102102 ret = []
103103 bld_ext = self .distribution .get_command_obj ('build_ext' )
104- compiler_type = bld_ext .compiler .compiler_type
104+ compiler_type = bld_ext .compiler .compiler_type # type: ignore[attr-defined]
105105 libgit2_dlls = []
106106 if compiler_type == 'msvc' :
107107 libgit2_dlls .append ('git2.dll' )
@@ -121,7 +121,7 @@ def _get_dlls(self):
121121 log .debug (f'(looked in { look_dirs } )' )
122122 return ret
123123
124- def run (self ):
124+ def run (self ) -> None :
125125 build .run (self )
126126 for s , d in self ._get_dlls ():
127127 self .copy_file (s , d )
0 commit comments