From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by sourceware.org (Postfix) with ESMTPS id 047C2384F496 for ; Thu, 24 Nov 2022 11:53:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 047C2384F496 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=suse.cz Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id BD0171F749; Thu, 24 Nov 2022 11:53:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1669290782; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fbzg2L2OmYw2LzGPfwthnRRCG/+T+vMVT0NpRn05uyQ=; b=WfDT7ff0UdoBQ4MAdYX32O7LUVYPmvu1uzfdJABbr2fFdNHekDNqYW8m4ZIKBtIF79Yrfq 3bPqKC+NFY524wW++ER7NJdz7UHMUhHL/56n+myOWAatbDRkNo8hQb6Gy1ztZ0s5QKv56Q ojQoTLDUzGz8BplTqTCqw5Ct5PmEHiY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1669290782; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fbzg2L2OmYw2LzGPfwthnRRCG/+T+vMVT0NpRn05uyQ=; b=6jd6EiHPp4Oq99bqorWTjPYKfPoS3Oy53nNE10Q6Y8FK9QbiBzpnAOsVvhVAFP+Ay7/gU/ XWLzwoxV670CIwDg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id AA16413B4F; Thu, 24 Nov 2022 11:53:02 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id kxGWKB5bf2MabwAAMHmgww (envelope-from ); Thu, 24 Nov 2022 11:53:02 +0000 Message-ID: <60283611-bdd7-d294-a344-d37f082827e8@suse.cz> Date: Thu, 24 Nov 2022 12:53:02 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Subject: Re: [PATCH v2 16/19] modula2 front end: bootstrap and documentation tools Content-Language: en-US To: Gaius Mulley Cc: gcc-patches@gcc.gnu.org References: <11f42175-8e23-5da3-6a13-6172039bfca2@suse.cz> <87k052ppvq.fsf@debian> <87r0yesygv.fsf_-_@debian> <50b276a7-3a18-d405-b672-eecb5067f5de@suse.cz> <87r0yd4m40.fsf@debian> From: =?UTF-8?Q?Martin_Li=c5=a1ka?= In-Reply-To: <87r0yd4m40.fsf@debian> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,KAM_SHORT,NICE_REPLY_A,SPF_HELO_NONE,SPF_SOFTFAIL,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 11/8/22 14:22, Gaius Mulley wrote: > Martin Liška writes: > >> 1) I would prefer using ' instead of ": >> >> $ flake8 ./gcc/m2/tools-src/tidydates.py >> ... >> ./gcc/m2/tools-src/tidydates.py:124:30: Q000 Double quotes found but single quotes preferred >> ./gcc/m2/tools-src/tidydates.py:127:27: Q000 Double quotes found but single quotes preferred >> ./gcc/m2/tools-src/tidydates.py:132:27: Q000 Double quotes found but single quotes preferred >> ./gcc/m2/tools-src/tidydates.py:133:33: Q000 Double quotes found but single quotes preferred >> ./gcc/m2/tools-src/tidydates.py:138:26: Q000 Double quotes found but single quotes preferred >> ./gcc/m2/tools-src/tidydates.py:143:28: Q000 Double quotes found but >> single quotes preferred > > ah yes will switch the quotes character. > >> 2) Python-names would be nicer: >> >> def writeTemplate(fo, magic, start, end, dates, contribution, summary, >> lic): >> >> def write_template(...) > > agreed, will change > >> 3) def hasExt(name, ext) - please use Path from pathlib >> >> 4) while (str.find(line, "(*") != -1): >> >> '(*' in line >> ? Similarly elsewhere. >> >> 5) str.find(line, ...) >> >> Use rather directly: line.find(...) >> >> 6) please use flake8: >> https://gcc.gnu.org/codingconventions.html#python > > sure will do all above - I used flake8 but maybe the plugins weren't > enabled. I'll try flake8 on tumbleweed. > >> Thanks, >> Martin >> >> P.S. I'm going to merge Sphinx branch this Wednesday, so then we should port your >> conversion scripts to emit .rst instead of .texi. > > should be good - I'll complete the rst output in the scripts, > > regards, > Gaius Hi. As you probably noticed, the Sphinx migration didn't go well. However, it's still up to you if you want to use it or not for Modula 2. We have manuals like libgccjit, or Ada manuals that use RST natively and provide exported .texi files. Cheers and sorry for the troubles I caused. Martin