Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B776DC001DC for ; Wed, 19 Jul 2023 23:53:39 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id EF2D3867E0; Thu, 20 Jul 2023 01:51:04 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="irp99Qbv"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id F36A38677C; Thu, 20 Jul 2023 01:50:20 +0200 (CEST) Received: from mail-io1-xd2f.google.com (mail-io1-xd2f.google.com [IPv6:2607:f8b0:4864:20::d2f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 6410286795 for ; Thu, 20 Jul 2023 01:50:16 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd2f.google.com with SMTP id ca18e2360f4ac-783549ef058so8576439f.2 for ; Wed, 19 Jul 2023 16:50:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1689810615; x=1690415415; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=+tXGa3OjQoaScrk9507gr7Jx8gXycKXsy9B5XY4PgsY=; b=irp99Qbv6/6wOldSVtAs2cvb8XhHTcvbds+7S3uVxSsO4mmK5COmH0fYC2Omwop8jp SEuKd36hBun5gMXZfP89FY5JA9l+Xksjymkjr8GJIEwZvkHnk2/D7JqqwsIDO5h0qM10 ZxYJqm9Fy8cGIAYlOLEuNk+AzTdHrjr5p/wyU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689810615; x=1690415415; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+tXGa3OjQoaScrk9507gr7Jx8gXycKXsy9B5XY4PgsY=; b=M+o+8OAjCu71Wn2/N2JkJ4kTmgV88hi8jqq2t64adoLKydepjvtTJrjt0+LuRkZu/O iuD4eKMB9NzjeiZeEx5DlkU1MReng5sSnDujWJNVM2CXO6n/A6skz3/pbXc1qBjw6Fuh 53Vt/MvUZxXIWF0D+3jnQmjQmkTzTlaoeigRFl4UxUTXhNyBmRvM/erNOPnWF8Mduc/w s9TeyJyUUL/y6ce6f8yyehqlkV0fu85QBNnSA239l8VBXN69bLeIEaNaKendrANlfSQ6 QUpWpBPkKM0EveAP5HtNQJ/c10WPPvo6tnfVBCDX0L+Tl7/e8cRbTlh32ezvM3s3u+ou bciA== X-Gm-Message-State: ABy/qLZl2p2ymQq7LTZ6Kbb7Fv/I6HoPKBlat9AGfa15r8iXs4nyqcaU 1twgDElm1GEqeiQsdV6pS3CgUftG0l8fk+RJh4I= X-Google-Smtp-Source: APBJJlGexbwuDMAVDnFd7hyrXTh8xuazjVyy/GF/ymuaJte6CegIsvUjP1YQu8iN9UH+iSzr76GYgw== X-Received: by 2002:a5d:9ad6:0:b0:783:550e:33c0 with SMTP id x22-20020a5d9ad6000000b00783550e33c0mr4367485ion.7.1689810614886; Wed, 19 Jul 2023 16:50:14 -0700 (PDT) Received: from sjg1.lan (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id ed16-20020a056638291000b0042bb1779c18sm1551779jab.151.2023.07.19.16.50.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jul 2023 16:50:14 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Mike Frysinger , Simon Glass Subject: [PATCH v4 21/83] buildman: Tidy up pylint warnings in main Date: Wed, 19 Jul 2023 17:48:29 -0600 Message-ID: <20230719234953.796101-22-sjg@chromium.org> X-Mailer: git-send-email 2.41.0.487.g6d72f3e995-goog In-Reply-To: <20230719234953.796101-1-sjg@chromium.org> References: <20230719234953.796101-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Tidy up the various pylint warnings in module 'main'. Signed-off-by: Simon Glass --- (no changes since v1) tools/buildman/main.py | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/tools/buildman/main.py b/tools/buildman/main.py index 096f5328a272..9b55125f745b 100755 --- a/tools/buildman/main.py +++ b/tools/buildman/main.py @@ -6,29 +6,21 @@ """See README for more information""" -import doctest -import multiprocessing import os -import re import sys # Bring in the patman libraries +# pylint: disable=C0413 our_path = os.path.dirname(os.path.realpath(__file__)) sys.path.insert(1, os.path.join(our_path, '..')) # Our modules -from buildman import board from buildman import bsettings -from buildman import builder from buildman import cmdline from buildman import control -from buildman import toolchain -from patman import patchstream -from patman import gitutil -from u_boot_pylib import terminal from u_boot_pylib import test_util -def RunTests(skip_net_tests, debug, verbose, args): +def run_tests(skip_net_tests, debug, verbose, args): """Run the buildman tests Args: @@ -37,9 +29,11 @@ def RunTests(skip_net_tests, debug, verbose, args): verbosity (int): Verbosity level to use (0-4) args (list of str): List of tests to run, empty to run all """ + # These imports are here since tests are not available when buildman is + # installed as a Python module + # pylint: disable=C0415 from buildman import func_test from buildman import test - import doctest test_name = args and args[0] or None if skip_net_tests: @@ -55,6 +49,11 @@ def RunTests(skip_net_tests, debug, verbose, args): return (0 if result.wasSuccessful() else 1) def run_buildman(): + """Run bulidman + + This is the main program. It collects arguments and runs either the tests or + the control module. + """ options, args = cmdline.ParseArgs() if not options.debug: @@ -62,8 +61,8 @@ def run_buildman(): # Run our meagre tests if cmdline.HAS_TESTS and options.test: - return RunTests(options.skip_net_tests, options.debug, options.verbose, - args) + return run_tests(options.skip_net_tests, options.debug, options.verbose, + args) # Build selected commits for selected boards else: -- 2.41.0.487.g6d72f3e995-goog