From c762c2d680371826cd7846fac94c206b8337d3a3 Mon Sep 17 00:00:00 2001 From: Christian Kellner Date: Mon, 24 Jan 2022 09:15:59 +0000 Subject: [PATCH 1/4] pylint: move config to setup.cfg This is what we do in osbuild, lets do it here too, so we are in sync about where the configuration is. --- .pylintrc | 3 --- setup.cfg | 9 +++++++++ 2 files changed, 9 insertions(+), 3 deletions(-) delete mode 100644 .pylintrc create mode 100644 setup.cfg diff --git a/.pylintrc b/.pylintrc deleted file mode 100644 index 12488cf..0000000 --- a/.pylintrc +++ /dev/null @@ -1,3 +0,0 @@ -[MASTER] -disable=missing-docstring,too-few-public-methods,invalid-name,duplicate-code,superfluous-parens,too-many-locals,attribute-defined-outside-init,too-many-arguments -max-line-length=120 diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..e447610 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,9 @@ +[pylint.MASTER] +disable=missing-docstring,too-few-public-methods,invalid-name,duplicate-code,superfluous-parens,too-many-locals,attribute-defined-outside-init,too-many-arguments,consider-using-with,consider-using-from-import + +[pylint.DESIGN] +max-attributes=10 +max-statements=75 + +[pycodestyle] +max-line-length = 120 From 7e801503e3a0a537900cec07ba36c5542b14b794 Mon Sep 17 00:00:00 2001 From: Christian Kellner Date: Mon, 24 Jan 2022 09:16:42 +0000 Subject: [PATCH 2/4] builder: fix command line argument names Fix the names for various command line arguments for when the builder plugin is invoked as a stand-alone executable. --- plugins/builder/osbuild.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/builder/osbuild.py b/plugins/builder/osbuild.py index dd0c81a..7b88f36 100644 --- a/plugins/builder/osbuild.py +++ b/plugins/builder/osbuild.py @@ -547,9 +547,9 @@ def main(): subpar = sp.add_parser("compose", help='create a new compose') subpar.add_argument("name", metavar="NAME", help='The name') - subpar.add_argument("version", metavar="NAME", help='The version') + subpar.add_argument("version", metavar="VERSION", help='The version') subpar.add_argument("release", metavar="RELEASE", help='The release') - subpar.add_argument("distro", metavar="NAME", help='The distribution') + subpar.add_argument("distro", metavar="DISTRO", help='The distribution') subpar.add_argument("repo", metavar="REPO", help='The repository to use', type=str, action="append", default=[]) subpar.add_argument("arch", metavar="ARCHITECTURE", help='Request the architecture', From db3745c611172afcc2543cbc37210315e081aaf1 Mon Sep 17 00:00:00 2001 From: Christian Kellner Date: Mon, 24 Jan 2022 09:17:58 +0000 Subject: [PATCH 3/4] devcontainer: include openssl Needed for certificate generation. --- .devcontainer/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index dca5aa5..c247257 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -15,6 +15,7 @@ RUN dnf install -y \ koji-utils \ lsof \ make \ + openssl \ podman \ postgresql \ pylint \ From e48c0322fb015655eddb35bdcb286c138f18579b Mon Sep 17 00:00:00 2001 From: Christian Kellner Date: Mon, 24 Jan 2022 09:19:04 +0000 Subject: [PATCH 4/4] builder: small whitespace fix Two lines before the first class. Will make auto-format happy; and David. --- plugins/builder/osbuild.py | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/builder/osbuild.py b/plugins/builder/osbuild.py index 7b88f36..acd286e 100644 --- a/plugins/builder/osbuild.py +++ b/plugins/builder/osbuild.py @@ -46,6 +46,7 @@ # koji API. It is based on the corresponding OpenAPI specification # version '1' and should model it closely. + class Repository: def __init__(self, baseurl: str, gpgkey: str = None): self.baseurl = baseurl