File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ def _get_libgit2_path():
4848
4949 # Default
5050 if os .name == 'nt' :
51- return Path (r'%s\libgit2' % os .getenv ('ProgramFiles' ))
51+ return Path (r'%s\libgit2' % os .getenv ('ProgramFiles' )) # noqa: SIM112
5252 return Path ('/usr/local' )
5353
5454
Original file line number Diff line number Diff line change 4545# C_HEADER_SRC
4646if getattr (sys , 'frozen' , False ):
4747 if hasattr (sys , '_MEIPASS' ):
48- dir_path = Path (sys ._MEIPASS )
48+ dir_path = Path (sys ._MEIPASS ) # type: ignore
4949 else :
5050 dir_path = Path (sys .executable ).parent
5151else :
8383 'submodule.h' ,
8484 'callbacks.h' , # Bridge from libgit2 to Python
8585]
86- h_source = []
86+ h_source : list [ str ] = []
8787for h_file in h_files :
88- h_file = dir_path / 'decl' / h_file
89- with codecs .open (h_file , 'r' , 'utf-8' ) as f :
88+ h_file = dir_path / 'decl' / h_file # noqa: PLW2901
89+ with codecs .open (str ( h_file ) , 'r' , 'utf-8' ) as f :
9090 h_source .append (f .read ())
9191
9292C_HEADER_SRC = '\n ' .join (h_source )
9999# ffi
100100_ , libgit2_kw = get_libgit2_paths ()
101101ffi = FFI ()
102- ffi .set_source ('pygit2._libgit2' , C_PREAMBLE , ** libgit2_kw )
102+ ffi .set_source ('pygit2._libgit2' , C_PREAMBLE , ** libgit2_kw ) # type: ignore
103103ffi .cdef (C_HEADER_SRC )
104104
105105
You can’t perform that action at this time.
0 commit comments