aboutsummaryrefslogtreecommitdiffstats
path: root/library/python/testing/yatest_lib
diff options
context:
space:
mode:
authordeshevoy <deshevoy@yandex-team.ru>2022-02-10 16:46:56 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:56 +0300
commite988f30484abe5fdeedcc7a5d3c226c01a21800c (patch)
tree0a217b173aabb57b7e51f8a169989b1a3e0309fe /library/python/testing/yatest_lib
parent33ee501c05d3f24036ae89766a858930ae66c548 (diff)
downloadydb-e988f30484abe5fdeedcc7a5d3c226c01a21800c.tar.gz
Restoring authorship annotation for <deshevoy@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/python/testing/yatest_lib')
-rw-r--r--library/python/testing/yatest_lib/external.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/library/python/testing/yatest_lib/external.py b/library/python/testing/yatest_lib/external.py
index 39113230d9..699ba4449c 100644
--- a/library/python/testing/yatest_lib/external.py
+++ b/library/python/testing/yatest_lib/external.py
@@ -15,7 +15,7 @@ logger = logging.getLogger(__name__)
MDS_URI_PREFIX = 'https://storage.yandex-team.ru/get-devtools/'
-def apply(func, value, apply_to_keys=False):
+def apply(func, value, apply_to_keys=False):
"""
Applies func to every possible member of value
:param value: could be either a primitive object or a complex one (list, dicts)
@@ -41,7 +41,7 @@ def apply(func, value, apply_to_keys=False):
for key, val in sorted(value.items(), key=lambda dict_item: dict_item[0]):
path = copy.copy(value_path)
path.append(key)
- res[_apply(func, key, path) if apply_to_keys else key] = _apply(func, val, path)
+ res[_apply(func, key, path) if apply_to_keys else key] = _apply(func, val, path)
else:
res = func(value, value_path)
return res
@@ -78,7 +78,7 @@ def serialize(value):
if is_coroutine(val):
return None
raise ValueError("Cannot serialize value '{}' of type {}".format(val, type(val)))
- return apply(_serialize, value, apply_to_keys=True)
+ return apply(_serialize, value, apply_to_keys=True)
def is_external(value):
@@ -89,7 +89,7 @@ class ExternalSchema(object):
File = "file"
SandboxResource = "sbr"
Delayed = "delayed"
- HTTP = "http"
+ HTTP = "http"
class CanonicalObject(dict):
@@ -131,10 +131,10 @@ class ExternalDataInfo(object):
return self.uri.startswith(ExternalSchema.Delayed)
@property
- def is_http(self):
- return self.uri.startswith(ExternalSchema.HTTP)
-
- @property
+ def is_http(self):
+ return self.uri.startswith(ExternalSchema.HTTP)
+
+ @property
def path(self):
if self.uri.count("://") != 1:
logger.error("Invalid external data uri: '%s'", self.uri)