--collect-all opencv --recursive-copy-metadata opencv
"<str>x<str>x<float>-<str>:<int>x<int>₽»"
import re
...
def teststr(data: str):
floatre = r"([0-9](?:_?[0-9])*\.(?:[0-9](?:_?[0-9])*)?|\.[0-9](?:_?[0-9])*)"
intre = r"(0[xX](?:_?[0-9a-fA-F])+|0[bB](?:_?[01])+|0[oO](?:_?[0-7])+|(?:0(?:_?0)*|[1-9](?:_?[0-9])*))"
strre = r"([^'\\]*(?:\\.[^'\\]*)*'|[^\"\\]*(?:\\.[^\"\\]*)*\")"
regex = re.compile(r"[a-zA-Z]+x[a-zA-Z]+x"+floatre+r"-[a-zA-Z]+:"+intre+r"x"+intre+r"₽»")
return re.match(regex, data)
...
def flatten(array: list):
def popen(arr: list | tuple):
if not arr or not arr[0]:
return arr
while type(arr[0]) in (tuple, list):
arr = arr[0]
pass
return arr
if len(array) in (0, 1):
return popen(array)
if type(array[0]) == str:
if type(array[1]) == list:
return [array[0], *flatten(array[1:])]
pass
return array
raise RuntimeError