Re: [PATCH b4] config: add send-me-too configuration

Jeremy Kerr <[email protected]> Wed, 10 Jun 2026 10:49:11 +0800
Newsgroups org.kernel.linux.tools
Message-ID <f7e99f980881f79702491c1440fd282f17f85b19.camel@codeconstruct.com.au>
Hi Konstantin,

Thanks for the review!

> > diff --git a/docs/contributor/send.rst b/docs/contributor/send.rst
> > index ba18ef5..5769cd7 100644
> > --- a/docs/contributor/send.rst
> > +++ b/docs/contributor/send.rst
> > @@ -321,7 +321,9 @@ Command line flags
> >    :ref:`contributor_settings`).
> >  
> >  ``--not-me-too``
> > -  Removes your own email address from the recipients.
> > +  Removes your own email address from the recipients. This can be set in the
> > +  configuration using the :term:`b4.send-me-too`, setting to `no`. (see
> > +  :ref:`contributor_settings`).
> 
> Small nit -- you probably wanted to use ``no`` here, not `no` (trips me 
> up all the time, too).

Ack, fixed, and reflowed to 72.

> > diff --git a/src/b4/ez.py b/src/b4/ez.py
> > index 3e81138..39168e6 100644
> > --- a/src/b4/ez.py
> > +++ b/src/b4/ez.py
> > @@ -2252,7 +2252,8 @@ def cmd_send(cmdargs: argparse.Namespace) -> None:
> >                  ccdests.append(btr.addr)
> >  
> >          excludes = b4.get_excluded_addrs()
> > -        if cmdargs.not_me_too:
> > +        conf_me_too = config.get('send-me-too').lower()
> > +        if cmdargs.not_me_too or conf_me_too in {'no', 'n', 'false'}:
> 
> Safer to do:
> 
>   conf_me_too = str(config.get('send-me-too', 'yes')).lower()
> 
> Also, I believe, mypy won't yell at you then. :)

I'm up for less yelling. My original addition did introduce a warning:

  src/b4/ez.py:2256: error: Item "List[str]" of "Union[str, List[str], None]" has no attribute "lower"  [union-attr]
  src/b4/ez.py:2256: error: Item "None" of "Union[str, List[str], None]" has no attribute "lower"  [union-attr]

Which the str() does address.

v2 coming shortly.

Cheers,


Jeremy