All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Lautrbach <plautrba@redhat.com>
To: selinux@vger.kernel.org
Cc: Nicolas Iooss <nicolas.iooss@m4x.org>,
	William Roberts <william.c.roberts@intel.com>
Subject: Re: [PATCH] python/sepolicy: silence new flake8 warnings
Date: Wed, 13 May 2020 17:13:30 +0200	[thread overview]
Message-ID: <20200513151330.GA184355@workstation> (raw)
In-Reply-To: <20200512192957.112866-1-nicolas.iooss@m4x.org>

[-- Attachment #1: Type: text/plain, Size: 2115 bytes --]

On Tue, May 12, 2020 at 09:29:57PM +0200, Nicolas Iooss wrote:
> pyflakes 2.2.0 improved the way format strings are analyzed, which
> triggers new warnings in flake8:
> 
>     python/sepolicy/sepolicy/manpage.py:1046:23: F999 '...' % ... has
>     unused named argument(s): type
> 
>     python/sepolicy/sepolicy/manpage.py:1225:23: F999 '...' % ... has
>     unused named argument(s): user
> 
> Remove the unused arguments in order to silence these warnings.
> 
> This fixes failures in Travis-CI such as
> https://travis-ci.org/github/SELinuxProject/selinux/jobs/686230518#L5153
> 
> Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
> Acked-by: William Roberts <william.c.roberts@intel.com>

Applied.


> ---
>  python/sepolicy/sepolicy/manpage.py | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/python/sepolicy/sepolicy/manpage.py b/python/sepolicy/sepolicy/manpage.py
> index 442608191cc8..3e8a3be907e3 100755
> --- a/python/sepolicy/sepolicy/manpage.py
> +++ b/python/sepolicy/sepolicy/manpage.py
> @@ -1074,7 +1074,7 @@ If you wanted to change the default user mapping to use the %(user)s_u user, you
>  
>  .B semanage login -m -s %(user)s_u __default__
>  
> -""" % {'desc': self.desc, 'type': self.type, 'user': self.domainname, 'range': self._get_users_range()})
> +""" % {'desc': self.desc, 'user': self.domainname, 'range': self._get_users_range()})
>  
>          if "login_userdomain" in self.attributes and "login_userdomain" in self.all_attributes:
>              self.fd.write("""
> @@ -1245,7 +1245,7 @@ Execute the following to see the types that the SELinux user %(type)s can execut
>  
>  .B $ sesearch -A -s %(type)s -c process -p transition
>  
> -""" % {'user': self.domainname, 'type': self.type})
> +""" % {'type': self.type})
>  
>      def _role_header(self):
>          self.fd.write('.TH  "%(user)s_selinux"  "8"  "%(user)s" "mgrepl@redhat.com" "%(user)s SELinux Policy documentation"'

-- 
()  ascii ribbon campaign - against html e-mail 
/\  www.asciiribbon.org   - against proprietary attachments

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      parent reply	other threads:[~2020-05-13 15:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-12 19:29 [PATCH] python/sepolicy: silence new flake8 warnings Nicolas Iooss
2020-05-12 19:40 ` Roberts, William C
2020-05-12 19:48   ` Nicolas Iooss
2020-05-13 15:13 ` Petr Lautrbach [this message]

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=20200513151330.GA184355@workstation \
    --to=plautrba@redhat.com \
    --cc=nicolas.iooss@m4x.org \
    --cc=selinux@vger.kernel.org \
    --cc=william.c.roberts@intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.