From 2761ceb87fd8e2c3e0ab2b87657280a1fbd88311 Mon Sep 17 00:00:00 2001 From: Wolf-Michael Bolle Date: Mon, 24 May 2021 19:38:27 +0200 Subject: [PATCH 1/3] Fix some pylint issues. --- backive/__init__.py | 4 ++++ backive/config/config.py | 4 ++++ backive/tools/rsync.py | 3 --- setup.py | 2 -- tests/test_events.py | 4 ++++ 5 files changed, 12 insertions(+), 5 deletions(-) diff --git a/backive/__init__.py b/backive/__init__.py index 6ebb29f..7cbf1aa 100644 --- a/backive/__init__.py +++ b/backive/__init__.py @@ -1,3 +1,7 @@ +""" +TODO +""" + from ruamel.yaml import YAML import logging import sys diff --git a/backive/config/config.py b/backive/config/config.py index 69a6211..71b2710 100644 --- a/backive/config/config.py +++ b/backive/config/config.py @@ -1,3 +1,7 @@ +""" +TODO +""" + import os import pwd import json diff --git a/backive/tools/rsync.py b/backive/tools/rsync.py index 37178c9..9dd25f4 100644 --- a/backive/tools/rsync.py +++ b/backive/tools/rsync.py @@ -5,6 +5,3 @@ from backive.core.tool import AVAILABLE_TOOLS, register_tool class Rsync: def __init__(self, options): pass - - - diff --git a/setup.py b/setup.py index 6c9c614..8520c5e 100644 --- a/setup.py +++ b/setup.py @@ -43,5 +43,3 @@ setup_info = dict( ) setup(**setup_info) - - diff --git a/tests/test_events.py b/tests/test_events.py index 5fa5577..941c37a 100644 --- a/tests/test_events.py +++ b/tests/test_events.py @@ -1,3 +1,7 @@ +""" +TODO +""" + import unittest import os import asyncio From 9bb883e2259988b855db7481d2ffcd8430ad2b74 Mon Sep 17 00:00:00 2001 From: Wolf-Michael Bolle Date: Mon, 24 May 2021 20:45:02 +0200 Subject: [PATCH 2/3] Remove unused import. --- setup.py | 1 - 1 file changed, 1 deletion(-) diff --git a/setup.py b/setup.py index 8520c5e..5856a2f 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,3 @@ -import setuptools from setuptools import setup, find_packages From 4ba0c00c3dce275a01159c6b2cc6475d67650e30 Mon Sep 17 00:00:00 2001 From: Wolf-Michael Bolle Date: Mon, 24 May 2021 23:02:54 +0200 Subject: [PATCH 3/3] Fix some more pylint issues. --- backive/core/backup.py | 2 +- backive/core/events.py | 4 ++++ backive/core/scheduler.py | 3 +++ backive/core/tool.py | 3 +++ backive/tools/rsync.py | 3 +++ tests/test_events.py | 3 +++ 6 files changed, 17 insertions(+), 1 deletion(-) diff --git a/backive/core/backup.py b/backive/core/backup.py index 034e42f..dff375a 100644 --- a/backive/core/backup.py +++ b/backive/core/backup.py @@ -47,7 +47,7 @@ class Backup: user = self.config.get("user") proc = await asyncio.create_subprocess_shell( # "set -x; chown -R {} ${{BACKIVE_MOUNT}}/${{BACKIVE_TO}};".format(user) + -# "sudo -E -u {} sh -c '".format(user) + +# "sudo -E -u {} sh -c '".format(user) + self.config.get("script"), # "'", stdout=asyncio.subprocess.PIPE, diff --git a/backive/core/events.py b/backive/core/events.py index 5b04a76..7466dc7 100644 --- a/backive/core/events.py +++ b/backive/core/events.py @@ -1,3 +1,7 @@ +""" +TODO +""" + import os import asyncio diff --git a/backive/core/scheduler.py b/backive/core/scheduler.py index 7fffec1..529b0d7 100644 --- a/backive/core/scheduler.py +++ b/backive/core/scheduler.py @@ -5,6 +5,9 @@ from datetime import datetime class Scheduler(): + """ + TODO + """ __shared_state = dict() __data = dict() def __init__(self): diff --git a/backive/core/tool.py b/backive/core/tool.py index 8b11c4a..f3946db 100644 --- a/backive/core/tool.py +++ b/backive/core/tool.py @@ -4,6 +4,9 @@ import os AVAILABLE_TOOLS = {} def register_tool(name): + """ + TODO + """ def decorator(Cls): AVAILABLE_TOOLS.update({name: Cls}) return decorator diff --git a/backive/tools/rsync.py b/backive/tools/rsync.py index 9dd25f4..813ecf1 100644 --- a/backive/tools/rsync.py +++ b/backive/tools/rsync.py @@ -3,5 +3,8 @@ from backive.core.tool import AVAILABLE_TOOLS, register_tool @register_tool("rsync") class Rsync: + """ + TODO + """ def __init__(self, options): pass diff --git a/tests/test_events.py b/tests/test_events.py index 941c37a..2a387be 100644 --- a/tests/test_events.py +++ b/tests/test_events.py @@ -10,6 +10,9 @@ from backive.core.events import EventInterface class TestEvents(unittest.TestCase): + """ + TODO + """ def set_data(self, data): self.data = data