public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Gaius Mulley <gaiusmod2@gmail.com>
To: "Martin Liška" <mliska@suse.cz>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH v2 16/19] modula2 front end: bootstrap and documentation tools
Date: Tue, 08 Nov 2022 13:22:23 +0000	[thread overview]
Message-ID: <87r0yd4m40.fsf@debian> (raw)
In-Reply-To: <50b276a7-3a18-d405-b672-eecb5067f5de@suse.cz> ("Martin =?utf-8?Q?Li=C5=A1ka=22's?= message of "Mon, 7 Nov 2022 14:47:02 +0100")

Martin Liška <mliska@suse.cz> 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

  reply	other threads:[~2022-11-08 13:22 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-10 15:31 [PATCH] 16/19 " Gaius Mulley
2022-10-13  9:12 ` Martin Liška
2022-10-14 12:10   ` Gaius Mulley
2022-11-07 13:09     ` [PATCH v2 16/19] " Gaius Mulley
2022-11-07 13:47       ` Martin Liška
2022-11-08 13:22         ` Gaius Mulley [this message]
2022-11-24 11:53           ` Martin Liška
2022-11-24 14:30             ` Gaius Mulley
2022-11-25 16:25               ` Martin Liška
2022-11-25 17:10               ` David Malcolm
2022-11-27 16:51                 ` Gaius Mulley
2022-10-20 12:42 ` [PATCH] 16/19 " Martin Liška
2022-10-28 13:05   ` Gaius Mulley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r0yd4m40.fsf@debian \
    --to=gaiusmod2@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=mliska@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).