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 96C4AC0015E for ; Sun, 16 Jul 2023 00:40:45 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id F03A4865F0; Sun, 16 Jul 2023 02:38:26 +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="Sn+63GDT"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A5D25862B8; Sun, 16 Jul 2023 02:37:43 +0200 (CEST) Received: from mail-il1-x12c.google.com (mail-il1-x12c.google.com [IPv6:2607:f8b0:4864:20::12c]) (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 4B69D862B8 for ; Sun, 16 Jul 2023 02:37:38 +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-il1-x12c.google.com with SMTP id e9e14a558f8ab-3464c774f23so16696855ab.1 for ; Sat, 15 Jul 2023 17:37:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1689467857; x=1692059857; 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=/VwSGVLy4z8GTY7hTNHYR0Ya7vgeEL3uH84g4hrvJRw=; b=Sn+63GDTbQaXE9Xp4G0rdMY7Y+p3+MoNkxKtrlgfGZHbolZufQoDyInT85sz7Vagk5 OmuG9Q8ZQdohxTDQRMRaamrDixKyv88W/fryr51MEJ0HrqnsEhROqA5ec2+xHhusILXD s1LsCYcy1NmDxbFGDfS7zqiJDbxPZ+SjGVWXg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689467857; x=1692059857; 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=/VwSGVLy4z8GTY7hTNHYR0Ya7vgeEL3uH84g4hrvJRw=; b=epaJ0NJe+zAnXfvqTB8WOVNPIAAGoge0ENDD+KekUHCeA9+7tAHk6QzcH8Ncqj0i6K HV5ekNAwhv46oEy2+ANlIydfxz1fzIYSqIoOtmGhyLqmEaTpVW5IKvFBWuGPsBoZM+j1 QWEkl/BDrBajhHa9FONgJoX07FXTX/1BPB8oqH/hmenmp9ulT9bA8vpafP6Ygx0FbW0m TbKNkEIVCnUbppGrQ1IvBGswBcrRjZXnmWgUndANPBwo9NwwXat94BB9b1C8Uz48XCY/ f1X7Q5XIGt/fEc3WYkAS8qcdOXlBqoll1ChBirLGWMHyeXCko1B/H/nNfuOZbiNXh9uP f6PA== X-Gm-Message-State: ABy/qLaYUNSvOvmSpp//xVAukyqLdb8Uv4euDBjgPwgv+mTRtYxKAlSI jWKV1HZ03n0+0uWrLba6qB8aI9GntKU6f7MsS90= X-Google-Smtp-Source: APBJJlHnffAotYL5spZwi7EmcCv2lH74NnPu2ZT71nxXtJc6IG02QfrAe5UqqylY0j2RygkqJBy2SA== X-Received: by 2002:a92:d782:0:b0:346:7329:8e8d with SMTP id d2-20020a92d782000000b0034673298e8dmr7574760iln.8.1689467856910; Sat, 15 Jul 2023 17:37:36 -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 t3-20020a05663801e300b0042b52dc77e3sm3510512jaq.158.2023.07.15.17.37.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 Jul 2023 17:37:36 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Mike Frysinger , Simon Glass Subject: [PATCH v3 19/81] buildman: Tidy up pylint warnings in main Date: Sat, 15 Jul 2023 18:35:47 -0600 Message-ID: <20230716003718.231903-20-sjg@chromium.org> X-Mailer: git-send-email 2.41.0.455.g037347b96a-goog In-Reply-To: <20230716003718.231903-1-sjg@chromium.org> References: <20230716003718.231903-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.455.g037347b96a-goog