From 0bc52ba6fda08f55d21a7d44db57126b119f874f Mon Sep 17 00:00:00 2001 From: Kamalesh Babulal Date: Mon, 10 Jul 2023 10:14:57 +0530 Subject: [PATCH] python: libcgroup.pyx - fix lines, spaces lint warnings Fix following spaces, lines warnings reported by Cython-lint: - libcgroup.pyx:14:13: E222 multiple spaces after operator - libcgroup.pyx:50:1: E302 expected 2 blank lines, found 1 - libcgroup.pyx:53:1: E302 expected 2 blank lines, found 1 - libcgroup.pyx:57:1: E302 expected 2 blank lines, found 1 - libcgroup.pyx:85:1: E305 expected 2 blank lines after class or function definition, found 1 Signed-off-by: Kamalesh Babulal Signed-off-by: Tom Hromatka --- src/python/libcgroup.pyx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/python/libcgroup.pyx b/src/python/libcgroup.pyx index 4323b73f..090118ec 100644 --- a/src/python/libcgroup.pyx +++ b/src/python/libcgroup.pyx @@ -11,7 +11,7 @@ """ Python bindings for the libcgroup library """ -__author__ = 'Tom Hromatka ' +__author__ = 'Tom Hromatka ' __date__ = "25 October 2021" from posix.types cimport pid_t, mode_t @@ -47,13 +47,16 @@ cdef class LogLevel: CGROUP_LOG_INFO = cgroup.CGROUP_LOG_INFO CGROUP_LOG_DEBUG = cgroup.CGROUP_LOG_DEBUG + def c_str(string): return bytes(string, "ascii") + def indent(in_str, cnt): leading_indent = cnt * ' ' return ''.join(leading_indent + line for line in in_str.splitlines(True)) + class Controller: def __init__(self, name): self.name = name @@ -82,6 +85,7 @@ class Controller: return True + cdef class Cgroup: """ Python object representing a libcgroup cgroup """ cdef cgroup.cgroup * _cgp -- 2.47.2