Skip to content

Commit 4de9d94

Browse files
committed
extract_utils: fixups_lib: fix typing
Change-Id: I8514884d9dc18d83b93ef33b26c97873d49ba1c5
1 parent 0ea30ed commit 4de9d94

1 file changed

Lines changed: 23 additions & 6 deletions

File tree

extract_utils/fixups_lib.py

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
from __future__ import annotations
77

8-
from typing import Callable, List, Optional
8+
from typing import Any, Callable, List, Optional
99

1010
from extract_utils.fixups import fixups_type, fixups_user_type
1111

@@ -25,11 +25,19 @@
2525
libs_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

Comments
 (0)