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 B0794C0015E for ; Wed, 5 Jul 2023 12:20:25 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1406686202; Wed, 5 Jul 2023 14:20:24 +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="TnFp6T5z"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 327D18621D; Wed, 5 Jul 2023 14:20:23 +0200 (CEST) Received: from mail-io1-xd31.google.com (mail-io1-xd31.google.com [IPv6:2607:f8b0:4864:20::d31]) (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 C2BD48603C for ; Wed, 5 Jul 2023 14:20:20 +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-xd31.google.com with SMTP id ca18e2360f4ac-78362f574c9so232264939f.3 for ; Wed, 05 Jul 2023 05:20:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1688559619; x=1691151619; 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=QhzDPMeZZauSkq72x4PjTVSW/RIT5pk9lkUFjYfzFro=; b=TnFp6T5zg/03e2ZpFmWl7I55Sy7pc095mWoqDlYwbbrwC1FZ6GVEkaZFBbW2elP93b NTcOCUloLNrCWaNu7S0HlWePvGJETzexei3zFA2u3YcFlLMIrvffTYSafp6mHLc8XU+L GpA4ffI9EeAZGC1waEuGgatujn8OTH2VxatC4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688559619; x=1691151619; 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=QhzDPMeZZauSkq72x4PjTVSW/RIT5pk9lkUFjYfzFro=; b=MxOWh/5HcVZXT9lod9NR8dja505SZjPMZCUfvzcrHAJoKb1bLCN9oKYxcu2RCj87Oh rhZGp4kfdO7xga5v2tSv9T78GuvKtHfcqy/UIa0XM4l1tPBad4BEr50CzaZLT7OlMkqM RaLvfh/xgQwnJgMFoyaXC9FhACXXB4PheC3W7873bjTYh7pVQQ43lBQDszBpc4Cnmqb1 UyThxviC23obJlEAOGFIJUMmkGshcuHNQFkOTdGZn4POWELIg7tyBKkum+gYbDiZ0yPT 6cvWLnlnrz8gatm/p8lzHiBRBTrSrd2Wm0jWRx3D4CI0t5sXN4mw2teH67Ewk4SeHlMF XYCg== X-Gm-Message-State: AC+VfDxXsY9D8qJfHIKqyocTZu+ooKh4irU4R3vyjWI9QiLUS1KR2Re9 /V/+MdJd0IEEwb1+MD/jKDdcfJ1afIty2mokbNo= X-Google-Smtp-Source: ACHHUZ45yGdldxA0NZTLaQk/W2yyh4cLffGaOvyAj9qnbudJKyvRBo0hZhG0ZLo4X4zHvGOI3uc5GQ== X-Received: by 2002:a6b:ec15:0:b0:783:6544:cc9e with SMTP id c21-20020a6bec15000000b007836544cc9emr18298964ioh.8.1688559619094; Wed, 05 Jul 2023 05:20:19 -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 i11-20020a02ca4b000000b0042b1543bceasm3998459jal.21.2023.07.05.05.20.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jul 2023 05:20:18 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Simon Glass Subject: [PATCH v2 01/60] buildman: Tidy up pylint warnings in main Date: Wed, 5 Jul 2023 13:18:29 +0100 Message-ID: <20230705121951.1629361-2-sjg@chromium.org> X-Mailer: git-send-email 2.41.0.255.g8b1d071c50-goog In-Reply-To: <20230705121951.1629361-1-sjg@chromium.org> References: <20230705121951.1629361-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 | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/tools/buildman/main.py b/tools/buildman/main.py index a2ffbc9073e7..ca1beb098292 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, verbose, args): +def run_tests(skip_net_tests, verbose, args): """Run the buildman tests Args: @@ -36,9 +28,11 @@ def RunTests(skip_net_tests, 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: @@ -54,6 +48,11 @@ def RunTests(skip_net_tests, 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: @@ -61,7 +60,7 @@ def run_buildman(): # Run our meagre tests if cmdline.HAS_TESTS and options.test: - RunTests(options.skip_net_tests, options.verbose, args) + run_tests(options.skip_net_tests, options.verbose, args) # Build selected commits for selected boards else: -- 2.41.0.255.g8b1d071c50-goog