aboutsummaryrefslogtreecommitdiffstats
path: root/build/plugins/res.py
diff options
context:
space:
mode:
authorsnermolaev <snermolaev@yandex-team.com>2023-10-21 04:35:55 +0300
committersnermolaev <snermolaev@yandex-team.com>2023-10-21 05:14:46 +0300
commit61e65e86eb9daac7be0a0d3dbca1686fbfb3dcae (patch)
treedd92d550d5798346a60563cfb2b36c2cb9f81e39 /build/plugins/res.py
parent3223732c2dd456d88d3d71cc498ead9bce2ec185 (diff)
downloadydb-61e65e86eb9daac7be0a0d3dbca1686fbfb3dcae.tar.gz
cleanup plugins
Diffstat (limited to 'build/plugins/res.py')
-rw-r--r--build/plugins/res.py29
1 files changed, 1 insertions, 28 deletions
diff --git a/build/plugins/res.py b/build/plugins/res.py
index 3339ea8c0e..c7d1027061 100644
--- a/build/plugins/res.py
+++ b/build/plugins/res.py
@@ -1,37 +1,10 @@
import json
import os
import six
-from _common import iterpair, listid, pathid, rootrel_arc_src, tobuilddir, filter_out_by_keyword
+from _common import rootrel_arc_src
import ymake
-def split(lst, limit):
- # paths are specified with replaceable prefix
- # real length is unknown at the moment, that why we use root_lenght
- # as a rough estimation
- root_lenght = 200
- filepath = None
- lenght = 0
- bucket = []
-
- for item in lst:
- if filepath:
- lenght += root_lenght + len(filepath) + len(item)
- if lenght > limit and bucket:
- yield bucket
- bucket = []
- lenght = 0
-
- bucket.append(filepath)
- bucket.append(item)
- filepath = None
- else:
- filepath = item
-
- if bucket:
- yield bucket
-
-
def remove_prefix(text, prefix):
if text.startswith(prefix):
return text[len(prefix) :]