From 14d4012e8e024ca57c119928764b7dc43a900a98 Mon Sep 17 00:00:00 2001
From: jo <ljonas@riseup.net>
Date: Tue, 7 Sep 2021 23:10:21 +0200
Subject: [PATCH] Fix tools linting

---
 tools/.pylintrc        |  3 +++
 tools/packages.py      |  5 +----
 tools/packages_test.py | 10 +++++-----
 3 files changed, 9 insertions(+), 9 deletions(-)
 create mode 100644 tools/.pylintrc

diff --git a/tools/.pylintrc b/tools/.pylintrc
new file mode 100644
index 000000000..b274cc0fe
--- /dev/null
+++ b/tools/.pylintrc
@@ -0,0 +1,3 @@
+[MESSAGES CONTROL]
+disable=missing-module-docstring,
+        missing-function-docstring
diff --git a/tools/packages.py b/tools/packages.py
index e6a235d99..ed5c32a26 100755
--- a/tools/packages.py
+++ b/tools/packages.py
@@ -1,10 +1,7 @@
 #!/usr/bin/env python3
 
-import json
-import sys
 from argparse import ArgumentParser
 from configparser import ConfigParser
-from os import PathLike
 from pathlib import Path
 from typing import Iterator, Set
 
@@ -62,7 +59,7 @@ def run():
         choices=FORMATS,
         help="print packages list in a specific format.",
         default="list",
-    ),
+    )
     parser.add_argument(
         "-d",
         "--dev",
diff --git a/tools/packages_test.py b/tools/packages_test.py
index bdd9edb06..f4d095f74 100644
--- a/tools/packages_test.py
+++ b/tools/packages_test.py
@@ -1,8 +1,8 @@
 from pathlib import Path
 
-from .packages import list_packages, load_packages
+from tools.packages import list_packages, load_packages
 
-package_ini = """
+PACKAGE_INI = """
 [common]
 postgresql = buster
 # Some comment
@@ -20,13 +20,13 @@ result2 = {"apache2", "curl", "ffmpeg"}
 
 
 def test_load_packages():
-    assert load_packages(package_ini, "buster", False) == result1
-    assert load_packages(package_ini, "bionic", True) == result2
+    assert load_packages(PACKAGE_INI, "buster", False) == result1
+    assert load_packages(PACKAGE_INI, "bionic", True) == result2
 
 
 def test_list_packages(tmp_path: Path):
     package_file = tmp_path / "packages.ini"
-    package_file.write_text(package_ini)
+    package_file.write_text(PACKAGE_INI)
 
     assert list_packages([tmp_path, package_file], "buster", False) == result1
     assert list_packages([tmp_path, package_file], "bionic", True) == result2