public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Zac Medico" <zmedico@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pylama/, dev-python/pylama/files/
Date: Sat, 14 Oct 2023 22:10:42 +0000 (UTC)	[thread overview]
Message-ID: <1697321437.0b3b0734f01cfd7e400d0a5ee1939e861961dc4c.zmedico@gentoo> (raw)

commit:     0b3b0734f01cfd7e400d0a5ee1939e861961dc4c
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 14 22:06:09 2023 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Oct 14 22:10:37 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0b3b0734

dev-python/pylama: Fix test_pylint elif bug 893838

Closes: https://bugs.gentoo.org/893838
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>

 .../pylama/files/pylama-8.4.1-dummy-elif.patch     | 32 ++++++++++++++++++++++
 dev-python/pylama/pylama-8.4.1-r1.ebuild           |  1 +
 2 files changed, 33 insertions(+)

diff --git a/dev-python/pylama/files/pylama-8.4.1-dummy-elif.patch b/dev-python/pylama/files/pylama-8.4.1-dummy-elif.patch
new file mode 100644
index 000000000000..788d38382114
--- /dev/null
+++ b/dev-python/pylama/files/pylama-8.4.1-dummy-elif.patch
@@ -0,0 +1,32 @@
+From 2093ce0ad405e20efa3f2dad771a04577e0f7e6b Mon Sep 17 00:00:00 2001
+From: Stanislav Levin <slev@altlinux.org>
+Date: Fri, 12 May 2023 19:38:41 +0300
+Subject: [PATCH] tests: Sync pylint's no-else-return
+
+https://github.com/klen/pylama/pull/243
+
+See https://pylint.readthedocs.io/en/latest/user_guide/messages/refactor/no-else-return.html for details.
+
+Fixes: https://github.com/klen/pylama/issues/238
+Signed-off-by: Stanislav Levin <slev@altlinux.org>
+---
+ dummy.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/dummy.py b/dummy.py
+index c19ee6d..09a0e3c 100644
+--- a/dummy.py
++++ b/dummy.py
+@@ -22,10 +22,10 @@ def __init__(self, filename, loc, use_column=True):
+         if test == 1:
+             if test == 1:
+                 return 28
+-            elif test == 2:
++            if test == 2:
+                 return 28
+             return 28
+-        elif test == 2:
++        if test == 2:
+             return 28
+ 
+     def __str__(self):

diff --git a/dev-python/pylama/pylama-8.4.1-r1.ebuild b/dev-python/pylama/pylama-8.4.1-r1.ebuild
index c1a76432c6e9..30c5ca59c22f 100644
--- a/dev-python/pylama/pylama-8.4.1-r1.ebuild
+++ b/dev-python/pylama/pylama-8.4.1-r1.ebuild
@@ -45,6 +45,7 @@ distutils_enable_tests pytest
 
 PATCHES=(
 	"${FILESDIR}"/${P}-tomli.patch
+	"${FILESDIR}"/${P}-dummy-elif.patch
 )
 
 EPYTEST_DESELECT=(


             reply	other threads:[~2023-10-14 22:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-14 22:10 Zac Medico [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-01-26 14:33 [gentoo-commits] repo/gentoo:master commit in: dev-python/pylama/, dev-python/pylama/files/ Michał Górny

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=1697321437.0b3b0734f01cfd7e400d0a5ee1939e861961dc4c.zmedico@gentoo \
    --to=zmedico@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.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