From: Dima Pasechnik <dimpase@cs.ox.ac.uk>
To: bug-gnulib@gnu.org
Subject: Re: gnulib-tool.py: Follow gnulib-tool changes, part 27.
Date: Sun, 25 Feb 2024 00:03:42 +0000 [thread overview]
Message-ID: <005ECEB2-5D0D-43C6-8AA2-B44D6AF0219E@cs.ox.ac.uk> (raw)
In-Reply-To: <4535941.X513TT2pbd@nimes>
[-- Attachment #1: Type: text/plain, Size: 2120 bytes --]
Hi Bruno,
The pythonic way is
mode is not None
rather than
mode != None
(the reason is None is an object)
Just in case,
Dima
On 24 February 2024 23:25:51 GMT, Bruno Haible <bruno@clisp.org> wrote:
>Hi Collin,
>
>> > I.e. you meant to write
>> > mode != None
>> > not
>> > modules != None
>> > ?
>>
>> The second fixes this typo. Thanks for noticing it.
>
>But there's another typo in the same line: The original code
>
> case $mode,$gnu_make in
> *test*,true)
> echo "gnulib-tool: --gnu-make not supported when including tests"
> func_exit 1;;
> esac
>
>has the intent to match the $mode values
> create-testdir
> create-megatestdir
> test
> megatest
>But these do not contain the substring "tests".
>
>Also, please can we stick with the syntax 'foo', not "foo", for literal
>strings. Outside of gnulib, both syntaxes seem to be in use. But when I
>search where the literal string 'foo' occurs, I don't want to make 2
>searches (for 'foo' and for "foo"), nor a regex search (for ['"]foo['"]).
>Simple things should remain simple. A certain canonical way to denote
>literal strings is necessary for this. (Btw, JavaScript has the same
>problem.)
>
>
>2024-02-24 Bruno Haible <bruno@clisp.org>
>
> gnulib-tool.py: Further fix last commit.
> * gnulib-tool.py (main): Make the mode test match for 'create-testdir',
> 'create-megatestdir', 'test', 'megatest'.
>
>diff --git a/gnulib-tool.py b/gnulib-tool.py
>index e168e8fc91..1df790c496 100755
>--- a/gnulib-tool.py
>+++ b/gnulib-tool.py
>@@ -607,7 +607,7 @@ def main():
> if cmdargs.pobase == None and cmdargs.podomain != None:
> message = '%s: warning: --po-domain has no effect without a --po-base option\n' % constants.APP['name']
> sys.stderr.write(message)
>- if mode != None and "tests" in mode and gnu_make:
>+ if mode != None and 'test' in mode and gnu_make:
> message = '%s: --gnu-make not supported when including tests\n' % constants.APP['name']
> sys.stderr.write(message)
> sys.exit(1)
>
>
>
>
[-- Attachment #2: Type: text/html, Size: 2833 bytes --]
next prev parent reply other threads:[~2024-02-25 2:05 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-23 5:23 [PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 27 Collin Funk
2024-02-23 13:08 ` Bruno Haible
2024-02-23 22:20 ` Collin Funk
2024-02-23 23:51 ` Bruno Haible
2024-02-24 2:36 ` Collin Funk
2024-02-24 5:49 ` gnulib-tool.py: Follow gnulib-tool changes, part 28 Collin Funk
2024-02-24 23:25 ` gnulib-tool.py: Follow gnulib-tool changes, part 27 Bruno Haible
2024-02-25 0:03 ` Dima Pasechnik [this message]
2024-02-25 11:57 ` Python != None Bruno Haible
2024-02-25 19:29 ` Collin Funk
2024-02-25 20:07 ` Collin Funk
2024-02-26 20:38 ` pycodestyle configuration Bruno Haible
2024-02-26 21:31 ` Collin Funk
2024-02-26 22:54 ` Bruno Haible
2024-02-27 0:51 ` Collin Funk
2024-02-27 2:38 ` Bruno Haible
2024-02-27 4:22 ` Collin Funk
2024-02-25 20:55 ` Python != None Dima Pasechnik
2024-02-25 12:02 ` Python 'strings' Bruno Haible
2024-02-25 19:05 ` Collin Funk
2024-02-24 23:42 ` gnulib-tool.py: Follow gnulib-tool changes, part 28 Bruno Haible
2024-02-25 0:47 ` Collin Funk
2024-02-25 1:18 ` Collin Funk
2024-02-25 1:25 ` Bruno Haible
2024-02-25 3:32 ` Collin Funk
2024-02-26 20:51 ` Bruno Haible
2024-02-28 11:51 ` Collin Funk
2024-02-28 12:14 ` Bruno Haible
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
List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=005ECEB2-5D0D-43C6-8AA2-B44D6AF0219E@cs.ox.ac.uk \
--to=dimpase@cs.ox.ac.uk \
--cc=bug-gnulib@gnu.org \
/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).