55
66from __future__ import annotations
77
8- from typing import Callable , List , Optional
8+ from typing import Any , Callable , List , Optional
99
1010from extract_utils .fixups import fixups_type , fixups_user_type
1111
2525libs_proto_unversioned = ('libprotobuf-cpp-lite' , 'libprotobuf-cpp-full' )
2626
2727
28- def lib_fixup_remove (lib : str , * args , ** kwargs ):
28+ def lib_fixup_remove (
29+ lib : str ,
30+ * args : Any ,
31+ ** kwargs : Any ,
32+ ):
2933 return ''
3034
3135
32- def lib_fixup_remove_arch_suffix (lib : str , * args , ** kwargs ):
36+ def lib_fixup_remove_arch_suffix (
37+ lib : str ,
38+ * args : Any ,
39+ ** kwargs : Any ,
40+ ):
3341 suffixes = ['-arm-android' , '-aarch64-android' ]
3442 for suffix in suffixes :
3543 if lib .endswith (suffix ):
@@ -38,11 +46,20 @@ def lib_fixup_remove_arch_suffix(lib: str, *args, **kwargs):
3846 assert False
3947
4048
41- def lib_fixup_vendorcompat (lib : str , partition : str , * args , ** kwargs ):
49+ def lib_fixup_vendorcompat (
50+ lib : str ,
51+ partition : str ,
52+ * args : Any ,
53+ ** kwargs : Any ,
54+ ):
4255 return f'{ lib } -vendorcompat' if partition in ['odm' , 'vendor' ] else lib
4356
4457
45- def lib_fixup_remove_proto_version_suffix (lib : str , * args , ** kwargs ):
58+ def lib_fixup_remove_proto_version_suffix (
59+ lib : str ,
60+ * args : Any ,
61+ ** kwargs : Any ,
62+ ):
4663 return lib .rsplit ('-' , 1 )[0 ]
4764
4865
@@ -82,7 +99,7 @@ def run_libs_fixup(
8299 if not fixups :
83100 return libs
84101
85- fixed_libs = []
102+ fixed_libs : List [ str ] = []
86103 for lib in libs :
87104 fixed_lib = run_lib_fixup (fixups , lib , partition )
88105 if fixed_lib == '' :
0 commit comments