aboutsummaryrefslogtreecommitdiffstats
path: root/library/python
diff options
context:
space:
mode:
authorspreis <spreis@yandex-team.ru>2022-02-10 16:47:13 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:47:13 +0300
commitb49848d6e361b76904f094b7d5e10d6edea75afe (patch)
tree9814fbd1c3effac9b8377c5d604b367b14e2db55 /library/python
parentbcd1126cbd5d445cd0665d295198aa39c6ab8cbe (diff)
downloadydb-b49848d6e361b76904f094b7d5e10d6edea75afe.tar.gz
Restoring authorship annotation for <spreis@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/python')
-rw-r--r--library/python/certifi/ya.make2
-rw-r--r--library/python/filelock/ut/lib/ya.make2
-rw-r--r--library/python/filelock/ut/py2/ya.make2
-rw-r--r--library/python/filelock/ut/py3/ya.make18
-rw-r--r--library/python/filelock/ut/ya.make14
-rw-r--r--library/python/fs/__init__.py12
-rw-r--r--library/python/fs/clonefile.pyx30
-rw-r--r--library/python/fs/ya.make18
-rw-r--r--library/python/resource/__init__.py2
-rw-r--r--library/python/resource/ut/py3/ya.make14
-rw-r--r--library/python/resource/ut/ya.make6
-rw-r--r--library/python/resource/ya.make2
-rw-r--r--library/python/runtime_py3/importer.pxi20
-rw-r--r--library/python/runtime_py3/ya.make4
14 files changed, 73 insertions, 73 deletions
diff --git a/library/python/certifi/ya.make b/library/python/certifi/ya.make
index bedb018850..64fefe2833 100644
--- a/library/python/certifi/ya.make
+++ b/library/python/certifi/ya.make
@@ -1,4 +1,4 @@
-PY23_LIBRARY()
+PY23_LIBRARY()
OWNER(orivej g:python-contrib)
diff --git a/library/python/filelock/ut/lib/ya.make b/library/python/filelock/ut/lib/ya.make
index 66861ebab4..f3f9da5a67 100644
--- a/library/python/filelock/ut/lib/ya.make
+++ b/library/python/filelock/ut/lib/ya.make
@@ -1,6 +1,6 @@
OWNER(g:yatool)
-PY23_LIBRARY()
+PY23_LIBRARY()
TEST_SRCS(test_filelock.py)
diff --git a/library/python/filelock/ut/py2/ya.make b/library/python/filelock/ut/py2/ya.make
index 69123ee7b6..30b54e0232 100644
--- a/library/python/filelock/ut/py2/ya.make
+++ b/library/python/filelock/ut/py2/ya.make
@@ -3,7 +3,7 @@ OWNER(g:yatool)
PY2TEST()
PEERDIR(
- library/python/filelock/ut/lib
+ library/python/filelock/ut/lib
)
END()
diff --git a/library/python/filelock/ut/py3/ya.make b/library/python/filelock/ut/py3/ya.make
index 96ef14d7df..05a856a19a 100644
--- a/library/python/filelock/ut/py3/ya.make
+++ b/library/python/filelock/ut/py3/ya.make
@@ -1,9 +1,9 @@
-OWNER(g:yatool)
-
-PY3TEST()
-
-PEERDIR(
- library/python/filelock/ut/lib
-)
-
-END()
+OWNER(g:yatool)
+
+PY3TEST()
+
+PEERDIR(
+ library/python/filelock/ut/lib
+)
+
+END()
diff --git a/library/python/filelock/ut/ya.make b/library/python/filelock/ut/ya.make
index bc88ee5a3e..9280ea415e 100644
--- a/library/python/filelock/ut/ya.make
+++ b/library/python/filelock/ut/ya.make
@@ -1,7 +1,7 @@
-OWNER(g:yatool)
-
-RECURSE(
- lib
- py2
- py3
-)
+OWNER(g:yatool)
+
+RECURSE(
+ lib
+ py2
+ py3
+)
diff --git a/library/python/fs/__init__.py b/library/python/fs/__init__.py
index cdd2cd28e2..b1b7cde079 100644
--- a/library/python/fs/__init__.py
+++ b/library/python/fs/__init__.py
@@ -466,14 +466,14 @@ def copytree3(
def walk_relative(path, topdown=True, onerror=None, followlinks=False):
for dirpath, dirnames, filenames in os.walk(path, topdown=topdown, onerror=onerror, followlinks=followlinks):
yield os.path.relpath(dirpath, path), dirnames, filenames
-
-def supports_clone():
- if 'darwin' in sys.platform:
- import platform
- return list(map(int, platform.mac_ver()[0].split('.'))) >= [10, 13]
- return False
+def supports_clone():
+ if 'darwin' in sys.platform:
+ import platform
+
+ return list(map(int, platform.mac_ver()[0].split('.'))) >= [10, 13]
+ return False
def commonpath(paths):
diff --git a/library/python/fs/clonefile.pyx b/library/python/fs/clonefile.pyx
index c7e834a4d8..830bb894f2 100644
--- a/library/python/fs/clonefile.pyx
+++ b/library/python/fs/clonefile.pyx
@@ -1,18 +1,18 @@
import six
-cdef extern from "sys/clonefile.h" nogil:
- int clonefile(const char * src, const char * dst, int flags)
-
-cdef extern from "Python.h":
- ctypedef struct PyObject
- cdef PyObject *PyExc_OSError
- PyObject *PyErr_SetFromErrno(PyObject *)
-
-cdef int _macos_clone_file(const char* src, const char* dst) except? 0:
- if clonefile(src, dst, 0) == -1:
- PyErr_SetFromErrno(PyExc_OSError)
- return 0
- return 1
-
-def macos_clone_file(src, dst):
+cdef extern from "sys/clonefile.h" nogil:
+ int clonefile(const char * src, const char * dst, int flags)
+
+cdef extern from "Python.h":
+ ctypedef struct PyObject
+ cdef PyObject *PyExc_OSError
+ PyObject *PyErr_SetFromErrno(PyObject *)
+
+cdef int _macos_clone_file(const char* src, const char* dst) except? 0:
+ if clonefile(src, dst, 0) == -1:
+ PyErr_SetFromErrno(PyExc_OSError)
+ return 0
+ return 1
+
+def macos_clone_file(src, dst):
return _macos_clone_file(six.ensure_binary(src), six.ensure_binary(dst)) != 0
diff --git a/library/python/fs/ya.make b/library/python/fs/ya.make
index 70a2dadb4f..b3c5092c71 100644
--- a/library/python/fs/ya.make
+++ b/library/python/fs/ya.make
@@ -2,16 +2,16 @@ OWNER(g:yatool)
PY23_LIBRARY()
-PY_SRCS(
- __init__.py
-)
+PY_SRCS(
+ __init__.py
+)
+
+IF (OS_DARWIN)
+ PY_SRCS(
+ clonefile.pyx
+ )
+ENDIF()
-IF (OS_DARWIN)
- PY_SRCS(
- clonefile.pyx
- )
-ENDIF()
-
PEERDIR(
library/python/func
library/python/strings
diff --git a/library/python/resource/__init__.py b/library/python/resource/__init__.py
index fdf7ea4850..26503ef7fc 100644
--- a/library/python/resource/__init__.py
+++ b/library/python/resource/__init__.py
@@ -3,7 +3,7 @@ from __res import resfs_read, resfs_resolve, resfs_src # noqa
import six
-
+
def iterkeys(prefix='', strip_prefix=False):
decode = lambda s: s
if isinstance(prefix, six.text_type):
diff --git a/library/python/resource/ut/py3/ya.make b/library/python/resource/ut/py3/ya.make
index 5bcde62e2b..64eb2e83ce 100644
--- a/library/python/resource/ut/py3/ya.make
+++ b/library/python/resource/ut/py3/ya.make
@@ -1,9 +1,9 @@
-PY3TEST()
-
+PY3TEST()
+
OWNER(pg)
-
-PEERDIR(
+
+PEERDIR(
library/python/resource/ut/lib
-)
-
-END()
+)
+
+END()
diff --git a/library/python/resource/ut/ya.make b/library/python/resource/ut/ya.make
index 92185ec976..a5ec192d74 100644
--- a/library/python/resource/ut/ya.make
+++ b/library/python/resource/ut/ya.make
@@ -1,6 +1,6 @@
OWNER(pg)
-RECURSE(
- py2
- py3
+RECURSE(
+ py2
+ py3
)
diff --git a/library/python/resource/ya.make b/library/python/resource/ya.make
index bc1ee77fe1..989329fa4b 100644
--- a/library/python/resource/ya.make
+++ b/library/python/resource/ya.make
@@ -1,4 +1,4 @@
-PY23_LIBRARY()
+PY23_LIBRARY()
OWNER(pg)
diff --git a/library/python/runtime_py3/importer.pxi b/library/python/runtime_py3/importer.pxi
index fd0d286fda..904f94dea2 100644
--- a/library/python/runtime_py3/importer.pxi
+++ b/library/python/runtime_py3/importer.pxi
@@ -110,8 +110,8 @@ def iter_py_modules(with_keys=False):
yield key, mod
else:
yield mod
-
-
+
+
def iter_prefixes(s):
i = s.find('.')
while i >= 0:
@@ -119,7 +119,7 @@ def iter_prefixes(s):
i = s.find('.', i + 1)
-def resfs_resolve(path):
+def resfs_resolve(path):
"""
Return the absolute path of a root-relative path if it exists.
"""
@@ -140,7 +140,7 @@ def resfs_src(key, resfs_file=False):
return __resource.find(b'resfs/src/' + _b(key))
-def resfs_read(path, builtin=None):
+def resfs_read(path, builtin=None):
"""
Return the bytes of the resource file at path, or None.
If builtin is True, do not look for it on the filesystem.
@@ -165,11 +165,11 @@ def resfs_files(prefix=b''):
def mod_path(mod):
- """
+ """
Return the resfs path to the source code of the module with the given name.
- """
+ """
return py_prefix + _b(mod).replace(b'.', b'/') + b'.py'
-
+
class ResourceImporter(object):
@@ -279,12 +279,12 @@ class ResourceImporter(object):
data = file_bytes(abspath)
return compile(data, _s(abspath), 'exec', dont_inherit=True)
- yapyc_path = path + b'.yapyc3'
- yapyc_data = resfs_read(yapyc_path, builtin=True)
+ yapyc_path = path + b'.yapyc3'
+ yapyc_data = resfs_read(yapyc_path, builtin=True)
if yapyc_data:
return marshal.loads(yapyc_data)
else:
- py_data = resfs_read(path, builtin=True)
+ py_data = resfs_read(path, builtin=True)
if py_data:
return compile(py_data, _s(relpath), 'exec', dont_inherit=True)
else:
diff --git a/library/python/runtime_py3/ya.make b/library/python/runtime_py3/ya.make
index a3b8a8b4d1..fa5c11341a 100644
--- a/library/python/runtime_py3/ya.make
+++ b/library/python/runtime_py3/ya.make
@@ -1,4 +1,4 @@
-PY3_LIBRARY()
+PY3_LIBRARY()
OWNER(
borman
@@ -20,7 +20,7 @@ NO_PYTHON_INCLUDES()
ENABLE(PYBUILD_NO_PYC)
-PY_SRCS(
+PY_SRCS(
entry_points.py
TOP_LEVEL