13 lines
347 B
Python
13 lines
347 B
Python
from typing import List
|
|
import re
|
|
|
|
|
|
re_types = re.compile('([BCDFIJSZV]|L(?:[a-zA-Z0-9_]+/)+[a-zA-Z0-9_]+;)')
|
|
|
|
re_method_sig = re.compile(fr"\(({re_types.pattern}*)\){re_types.pattern}")
|
|
|
|
|
|
def get_argument_count_types_descriptor(descriptor: str) -> List[str]:
|
|
args = re_method_sig.search(descriptor).group(1)
|
|
return re_types.findall(args)
|