From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by sourceware.org (Postfix) with ESMTPS id E65FC3835542 for ; Wed, 7 Dec 2022 09:49:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E65FC3835542 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-x332.google.com with SMTP id v124-20020a1cac82000000b003cf7a4ea2caso620840wme.5 for ; Wed, 07 Dec 2022 01:49:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=PqEehaB8X3Yz+40ylHZLpAqdMSP2kBXtqRefCX5CkeA=; b=ZQEL/ML2+S7iETFAlMPWUisLcPJVfO9rKhAuh0jgUtp8aedWCo2KIOq05Xk8y/Gufz iWZh7YdoFJQ6QXF+cuRa9u9vn7TaVVj6iMqSmKLpw+5KRNFbHoRLn5V4QNwkj/Y4sfBV iJeF61NMF2Lkqm6/Uj6+qth4SuW5eR9R7/j9iwvd4ZDXUwjGG637yvLET92qsOnza/PQ CYmRCf1TEIONNDlF0ng3ZuzhPzSwWOwV1BoabUdJTLkqBmAXscE4YHyP3L6ppJkvQtDp /Oge/wQXCRSiekswkvvsvQ2giDRnBst2NCzKM1yYm3FNAE0hSjS2DOGef3MxNaDRUVY9 Wq2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=PqEehaB8X3Yz+40ylHZLpAqdMSP2kBXtqRefCX5CkeA=; b=vVvLeUyfxwy4K2wU1N1n9luuAphvI/TPBF6GBzfh49gjHhrMmDZqwR5f9dOQCnePYk u2Uqhp2dTk7H6HF4H3t8nnJn++o2d45SWVfTLwgMR0jLAJqHIDXg/4SrUsWVv55X17Bl 2bOoSLiLcLOfS15l35oPbSBMBPOu9lcP6gH0bcz2+WoXu4AjJhVubnEJF8Va9Zf68kir t4A5TqfP5azdhw7lHy+KlkOzv6lhGH4SgpGH3Rsp2KKCnMf8rvQLDvUUg0n8d5F+kp3L IUGhV/7zjAhL2bFx3mBKU+LINQqhBh53cr8XDOw+OVb08/ssF4Y3grfFvtkEcrUOuM4+ BqAw== X-Gm-Message-State: ANoB5pkaqQApt6cHwcOwCfmoT7GyxpZtHvcHr69sK/e3c+Y+CRD3b/y0 rjf6GFojzM4M74B4HgCNASU= X-Google-Smtp-Source: AA0mqf6OBOl3YtRPYhUahFzbfJ3dtapXTiC/mLy4f5SpD9CsxDshEtEUS3nQni17bDLB/lFdsNeCQA== X-Received: by 2002:a7b:c8c3:0:b0:3cf:b49e:1638 with SMTP id f3-20020a7bc8c3000000b003cfb49e1638mr54929840wml.50.1670406546691; Wed, 07 Dec 2022 01:49:06 -0800 (PST) Received: from lancelot ([195.147.220.46]) by smtp.gmail.com with ESMTPSA id m24-20020a7bce18000000b003c6bd12ac27sm1053433wmc.37.2022.12.07.01.49.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Dec 2022 01:49:06 -0800 (PST) Received: from gaius by lancelot with local (Exim 4.94.2) (envelope-from ) id 1p2r31-008AxJ-6g; Wed, 07 Dec 2022 09:49:03 +0000 From: Gaius Mulley To: Martin =?utf-8?Q?Li=C5=A1ka?= Cc: gcc-patches@gcc.gnu.org Subject: Re: [PATCH v3 16/19] modula2 front end: bootstrap and documentation tools References: Date: Wed, 07 Dec 2022 09:49:03 +0000 In-Reply-To: ("Martin =?utf-8?Q?Li=C5=A1ka=22's?= message of "Wed, 7 Dec 2022 10:26:51 +0100") Message-ID: <87y1rjh7cg.fsf@debian> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Martin Li=C5=A1ka writes: > On 12/6/22 15:47, Gaius Mulley wrote: >> |Hi Martin, here is the revised patch having applied all previous >> recommendations: >> https://gcc.gnu.org/pipermail/gcc-patches/2022-October/603436.html. Is >> this ok now? Thanks for the improvement suggestions.| > > Hello. > > It looks much better and I'm sending a small patch that resolves the rema= ining > flake8 issue. I use the following plugins (some listed here: https://gcc.= gnu.org/codingconventions.html#python): > > $ flake8 --version > 5.0.4 (flake8-bugbear: 22.10.27, flake8-builtins: 1.5.3, > flake8-comprehensions: 3.4.0, flake8-import-order: 0.18.1, > flake8-quotes: 3.3.1, mccabe: 0.7.0, pycodestyle: 2.9.1, pyflakes: > 2.5.0) CPython 3.10.8 on Linux > > and I see: > > gcc/m2/tools-src> flake8 > ./boilerplate.py:108:66: E999 SyntaxError: invalid syntax > ./tidydates.py:26:1: I100 Import statements are in the wrong order. 'impo= rt pathlib' should be before 'import sys' > ./tidydates.py:129:50: E128 continuation line under-indented for visual i= ndent > ./def2doc.py:49:5: E301 expected 1 blank line, found 0 > ./def2doc.py:49:18: E211 whitespace before '(' > ./def2doc.py:51:5: E301 expected 1 blank line, found 0 > ./def2doc.py:51:18: E211 whitespace before '(' > ./def2doc.py:53:5: E301 expected 1 blank line, found 0 > ./def2doc.py:55:5: E301 expected 1 blank line, found 0 > ./def2doc.py:57:5: E301 expected 1 blank line, found 0 > ./def2doc.py:59:5: E301 expected 1 blank line, found 0 > ./def2doc.py:61:5: E301 expected 1 blank line, found 0 > ./def2doc.py:65:5: E301 expected 1 blank line, found 0 > ./def2doc.py:70:5: E301 expected 1 blank line, found 0 > ./def2doc.py:72:5: E301 expected 1 blank line, found 0 > ./def2doc.py:191:80: E501 line too long (81 > 79 characters) > ./def2doc.py:330:22: A002 argument "dir" is shadowing a python builtin > ./def2doc.py:348:23: A002 argument "dir" is shadowing a python builtin > ./def2doc.py:377:17: A002 argument "dir" is shadowing a python builtin > ./def2doc.py:396:21: A002 argument "dir" is shadowing a python builtin > ./def2doc.py:406:16: A002 argument "dir" is shadowing a python builtin > ./def2doc.py:418:15: A002 argument "dir" is shadowing a python builtin > ./def2doc.py:432:25: A002 argument "dir" is shadowing a python builtin > ./def2doc.py:437:19: Q000 Double quotes found but single quotes preferred > ./def2doc.py:439:19: Q000 Double quotes found but single quotes preferred > ./def2doc.py:441:19: Q000 Double quotes found but single quotes preferred > ./def2doc.py:468:18: Q001 Single quote multiline found but double quotes = preferred > > It seems the first one is a real syntax error. Anyway, feel free to apply= the suggested patch. > > And I would consider replacing the following static 'str.' calls: > > def2doc.py: output.write(str.replace(str.replace(str.rstrip(li= ne), > def2doc.py: output.write(str.replace(str.replace(line, '{', '@{'),= '}', '@}')) > > with line.rstrip().replace(...).replace(...) > > Cheers, > Martin Hi Martin, many thanks for the patch and suggestions (and flake8 plugin output) - I will apply the patch and change the str calls, regards, Gaius