aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzhshishkin <zhshishkin@yandex-team.ru>2022-02-10 16:47:46 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:47:46 +0300
commit4c8065245df3ea26b7757bcb1f8218df287f9148 (patch)
treec0748b5dcbade83af788c0abfa89c0383d6b779c
parent79c237341aa1ecfb6731e89bfe4bf65c3bb5179e (diff)
downloadydb-4c8065245df3ea26b7757bcb1f8218df287f9148.tar.gz
Restoring authorship annotation for <zhshishkin@yandex-team.ru>. Commit 2 of 2.
-rw-r--r--build/rules/go/vendor.policy6
-rw-r--r--contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/completion_queue.pxd.pxi2
-rw-r--r--contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/completion_queue.pyx.pxi2
-rw-r--r--contrib/python/future/future/backports/xmlrpc/client.py6
-rw-r--r--ydb/public/sdk/python/ydb/_session_impl.py20
-rw-r--r--ydb/public/sdk/python/ydb/_tx_ctx_impl.py10
-rw-r--r--ydb/public/sdk/python/ydb/table.py52
-rw-r--r--ydb/tests/functional/api/test_public_api.py40
8 files changed, 69 insertions, 69 deletions
diff --git a/build/rules/go/vendor.policy b/build/rules/go/vendor.policy
index f4f516cd04..3e9c0acada 100644
--- a/build/rules/go/vendor.policy
+++ b/build/rules/go/vendor.policy
@@ -728,9 +728,9 @@ ALLOW .* -> vendor/github.com/go-redsync/redsync/v4
ALLOW library/go/core/log/compat/logrus -> vendor/github.com/sirupsen/logrus
-# CONTRIB-2127
-ALLOW .* -> vendor/github.com/hashicorp/terraform-plugin-sdk/v2
-
+# CONTRIB-2127
+ALLOW .* -> vendor/github.com/hashicorp/terraform-plugin-sdk/v2
+
# CONTRIB-2139 library for building GraphQL servers without any fuss.
ALLOW .* -> vendor/github.com/99designs/gqlgen
ALLOW .* -> vendor/github.com/vektah/gqlparser/v2
diff --git a/contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/completion_queue.pxd.pxi b/contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/completion_queue.pxd.pxi
index 7e179cb819..0307f74cbe 100644
--- a/contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/completion_queue.pxd.pxi
+++ b/contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/completion_queue.pxd.pxi
@@ -13,7 +13,7 @@
# limitations under the License.
-cdef grpc_event _next(grpc_completion_queue *c_completion_queue, deadline) except *
+cdef grpc_event _next(grpc_completion_queue *c_completion_queue, deadline) except *
cdef _interpret_event(grpc_event c_event)
diff --git a/contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/completion_queue.pyx.pxi b/contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/completion_queue.pyx.pxi
index d619593476..a47403ac51 100644
--- a/contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/completion_queue.pyx.pxi
+++ b/contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/completion_queue.pyx.pxi
@@ -16,7 +16,7 @@
cdef int _INTERRUPT_CHECK_PERIOD_MS = 200
-cdef grpc_event _next(grpc_completion_queue *c_completion_queue, deadline) except *:
+cdef grpc_event _next(grpc_completion_queue *c_completion_queue, deadline) except *:
cdef gpr_timespec c_increment
cdef gpr_timespec c_timeout
cdef gpr_timespec c_deadline
diff --git a/contrib/python/future/future/backports/xmlrpc/client.py b/contrib/python/future/future/backports/xmlrpc/client.py
index 7eeed80750..3f0cae9b00 100644
--- a/contrib/python/future/future/backports/xmlrpc/client.py
+++ b/contrib/python/future/future/backports/xmlrpc/client.py
@@ -1102,9 +1102,9 @@ class _Method(object):
def __init__(self, send, name):
self.__send = send
self.__name = name
- def __repr__(self):
- return "<_Method for %s>" % self.__name
- __str__ = __repr__
+ def __repr__(self):
+ return "<_Method for %s>" % self.__name
+ __str__ = __repr__
def __getattr__(self, name):
return _Method(self.__send, "%s.%s" % (self.__name, name))
def __call__(self, *args):
diff --git a/ydb/public/sdk/python/ydb/_session_impl.py b/ydb/public/sdk/python/ydb/_session_impl.py
index 905f764d38..e1906299ec 100644
--- a/ydb/public/sdk/python/ydb/_session_impl.py
+++ b/ydb/public/sdk/python/ydb/_session_impl.py
@@ -50,12 +50,12 @@ class AlterTableOperation(operation.Operation):
self.ready = response_pb.operation.ready
-def copy_tables_request_factory(session_state, source_destination_pairs):
- request = session_state.attach_request(_apis.ydb_table.CopyTablesRequest())
- for source_path, destination_path in source_destination_pairs:
- table_item = request.tables.add()
- table_item.source_path = source_path
- table_item.destination_path = destination_path
+def copy_tables_request_factory(session_state, source_destination_pairs):
+ request = session_state.attach_request(_apis.ydb_table.CopyTablesRequest())
+ for source_path, destination_path in source_destination_pairs:
+ table_item = request.tables.add()
+ table_item.source_path = source_path
+ table_item.destination_path = destination_path
return request
@@ -272,8 +272,8 @@ def describe_table_request_factory(session_state, path, settings=None):
and hasattr(settings, "include_table_stats")
and settings.include_table_stats
):
- request.include_table_stats = settings.include_table_stats
-
+ request.include_table_stats = settings.include_table_stats
+
return request
@@ -459,7 +459,7 @@ class SessionState(object):
def keep(self, query, query_id):
if self._client_cache_enabled:
self._query_cache.put(query.name, (query, query_id))
- else:
+ else:
self._query_cache.put(query.name, (query, None))
return self
@@ -475,7 +475,7 @@ class SessionState(object):
return self._query_cache.get(self._query_key(query), self._default)
def erase(self, query):
- query, _ = self.lookup(query)
+ query, _ = self.lookup(query)
self._query_cache.erase(query.name)
def complete_query(self):
diff --git a/ydb/public/sdk/python/ydb/_tx_ctx_impl.py b/ydb/public/sdk/python/ydb/_tx_ctx_impl.py
index 8816b20977..765cd82e72 100644
--- a/ydb/public/sdk/python/ydb/_tx_ctx_impl.py
+++ b/ydb/public/sdk/python/ydb/_tx_ctx_impl.py
@@ -126,11 +126,11 @@ def execute_request_factory(
query_pb = _apis.ydb_table.Query(id=query_id)
parameters_types = data_query.parameters_types
else:
- if data_query is not None:
- # client cache disabled for send query text every time
- yql_text = data_query.yql_text
- parameters_types = data_query.parameters_types
- elif isinstance(query, types.DataQuery):
+ if data_query is not None:
+ # client cache disabled for send query text every time
+ yql_text = data_query.yql_text
+ parameters_types = data_query.parameters_types
+ elif isinstance(query, types.DataQuery):
if settings is not None and hasattr(settings, "keep_in_cache"):
keep_in_cache = settings.keep_in_cache
else:
diff --git a/ydb/public/sdk/python/ydb/table.py b/ydb/public/sdk/python/ydb/table.py
index 562d260b40..c49c4660c7 100644
--- a/ydb/public/sdk/python/ydb/table.py
+++ b/ydb/public/sdk/python/ydb/table.py
@@ -40,17 +40,17 @@ class DescribeTableSettings(settings_impl.BaseRequestSettings):
def __init__(self):
super(DescribeTableSettings, self).__init__()
self.include_shard_key_bounds = False
- self.include_table_stats = False
+ self.include_table_stats = False
def with_include_shard_key_bounds(self, value):
self.include_shard_key_bounds = value
return self
- def with_include_table_stats(self, value):
- self.include_table_stats = value
- return self
+ def with_include_table_stats(self, value):
+ self.include_table_stats = value
+ return self
+
-
class ExecDataQuerySettings(settings_impl.BaseRequestSettings):
def __init__(self):
super(ExecDataQuerySettings, self).__init__()
@@ -523,20 +523,20 @@ class TtlSettings(object):
return pb
-class TableStats(object):
- def __init__(self):
- self.partitions = None
+class TableStats(object):
+ def __init__(self):
+ self.partitions = None
self.store_size = 0
-
+
def with_store_size(self, store_size):
self.store_size = store_size
return self
- def with_partitions(self, partitions):
- self.partitions = partitions
- return self
-
-
+ def with_partitions(self, partitions):
+ self.partitions = partitions
+ return self
+
+
class ReadReplicasSettings(object):
def __init__(self):
self.per_az_read_replicas_count = 0
@@ -1474,14 +1474,14 @@ class TableSchemeEntry(scheme.SchemeEntry):
ttl_settings.value_since_unix_epoch.expire_after_seconds,
)
- self.table_stats = None
- if table_stats is not None:
- self.table_stats = TableStats()
- if table_stats.partitions != 0:
- self.table_stats = self.table_stats.with_partitions(
- table_stats.partitions
- )
-
+ self.table_stats = None
+ if table_stats is not None:
+ self.table_stats = TableStats()
+ if table_stats.partitions != 0:
+ self.table_stats = self.table_stats.with_partitions(
+ table_stats.partitions
+ )
+
if table_stats.store_size != 0:
self.table_stats = self.table_stats.with_store_size(
table_stats.store_size
@@ -1985,19 +1985,19 @@ class Session(BaseSession):
self._state.endpoint,
)
- def async_copy_table(self, source_path, destination_path, settings=None):
+ def async_copy_table(self, source_path, destination_path, settings=None):
return self.async_copy_tables(
[(source_path, destination_path)], settings=settings
)
-
+
@_utilities.wrap_async_call_exceptions
- def async_copy_tables(self, source_destination_pairs, settings=None):
+ def async_copy_tables(self, source_destination_pairs, settings=None):
return self._driver.future(
_session_impl.copy_tables_request_factory(
self._state, source_destination_pairs
),
_apis.TableService.Stub,
- _apis.TableService.CopyTables,
+ _apis.TableService.CopyTables,
_session_impl.wrap_operation,
settings,
(self._state,),
diff --git a/ydb/tests/functional/api/test_public_api.py b/ydb/tests/functional/api/test_public_api.py
index bb1a113efe..072ee35de3 100644
--- a/ydb/tests/functional/api/test_public_api.py
+++ b/ydb/tests/functional/api/test_public_api.py
@@ -1310,10 +1310,10 @@ class TestSessionNotFound(Base):
data_query = ydb.DataQuery('select 1', {})
session = ydb.retry_operation_sync(lambda: table_client.session().create())
session.transaction().execute(data_query, commit_tx=True)
- assert_that(session.has_prepared('select 1'), is_(True))
- assert_that(session._state.lookup('select 1')[1], is_(none()))
- assert_that(session.has_prepared(data_query), is_(True))
- assert_that(session._state.lookup(data_query)[1], is_(none()))
+ assert_that(session.has_prepared('select 1'), is_(True))
+ assert_that(session._state.lookup('select 1')[1], is_(none()))
+ assert_that(session.has_prepared(data_query), is_(True))
+ assert_that(session._state.lookup(data_query)[1], is_(none()))
def test_explicit_partitions_case_1(self):
@@ -1343,8 +1343,8 @@ class TestSessionNotFound(Base):
response = session.describe_table(
'/Root/test_explicit_partitions', ydb.DescribeTableSettings().with_include_shard_key_bounds(
True
- ).with_include_table_stats(
- True
+ ).with_include_table_stats(
+ True
)
)
@@ -1354,12 +1354,12 @@ class TestSessionNotFound(Base):
4
)
)
- assert_that(
- response.table_stats.partitions,
- equal_to(
- 4
- )
- )
+ assert_that(
+ response.table_stats.partitions,
+ equal_to(
+ 4
+ )
+ )
def test_explict_partitions_case_2(self):
@@ -1394,8 +1394,8 @@ class TestSessionNotFound(Base):
response = session.describe_table(
'/Root/test_explicit_partitions', ydb.DescribeTableSettings().with_include_shard_key_bounds(
True
- ).with_include_table_stats(
- True
+ ).with_include_table_stats(
+ True
)
)
@@ -1405,12 +1405,12 @@ class TestSessionNotFound(Base):
4
)
)
- assert_that(
- response.table_stats.partitions,
- equal_to(
- 4
- )
- )
+ assert_that(
+ response.table_stats.partitions,
+ equal_to(
+ 4
+ )
+ )
def test_simple_table_profile_settings(self):
description = ydb.TableDescription().with_column(ydb.Column('key', ydb.PrimitiveType.Utf8))