47
47
48
48
49
49
class sdist_files_from_git (sdist ):
50
- def get_file_list (self ):
50
+ def get_file_list (self ) -> None :
51
51
popen = Popen (
52
52
['git' , 'ls-files' ], stdout = PIPE , stderr = PIPE , universal_newlines = True
53
53
)
@@ -56,7 +56,7 @@ def get_file_list(self):
56
56
print (stderrdata )
57
57
sys .exit ()
58
58
59
- def exclude (line ) :
59
+ def exclude (line : str ) -> bool :
60
60
for prefix in ['.' , 'appveyor.yml' , 'docs/' , 'misc/' ]:
61
61
if line .startswith (prefix ):
62
62
return True
@@ -97,11 +97,11 @@ def exclude(line):
97
97
98
98
# On Windows, we install the git2.dll too.
99
99
class BuildWithDLLs (build ):
100
- def _get_dlls (self ):
100
+ def _get_dlls (self ) -> list [ tuple [ Path , Path ]] :
101
101
# return a list of (FQ-in-name, relative-out-name) tuples.
102
102
ret = []
103
103
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]
105
105
libgit2_dlls = []
106
106
if compiler_type == 'msvc' :
107
107
libgit2_dlls .append ('git2.dll' )
@@ -121,7 +121,7 @@ def _get_dlls(self):
121
121
log .debug (f'(looked in { look_dirs } )' )
122
122
return ret
123
123
124
- def run (self ):
124
+ def run (self ) -> None :
125
125
build .run (self )
126
126
for s , d in self ._get_dlls ():
127
127
self .copy_file (s , d )
0 commit comments