[Python-modules-commits] [pytest-pylint] 01/03: Fix inconsistent-return-statements pylint error

Benjamin Drung bdrung at moszumanska.debian.org
Thu Feb 1 22:43:15 UTC 2018


This is an automated email from the git hooks/post-receive script.

bdrung pushed a commit to branch master
in repository pytest-pylint.

commit 546276e7302bbc0490a57c2ec14c384657f8aa5f
Author: Benjamin Drung <bdrung at debian.org>
Date:   Thu Feb 1 22:52:22 2018 +0100

    Fix inconsistent-return-statements pylint error
    
    pylint 1.8.1 complains about pytest_pylint.py:
    R:116, 0: Either all return statements in a function should return an
    expression, or none of them should. (inconsistent-return-statements)
    
    Bug-Debian: https://bugs.debian.org/887573
    Forwarded: https://github.com/carsongee/pytest-pylint/pull/32
---
 ...consistent-return-statements-pylint-error.patch | 42 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 2 files changed, 43 insertions(+)

diff --git a/debian/patches/0001-Fix-inconsistent-return-statements-pylint-error.patch b/debian/patches/0001-Fix-inconsistent-return-statements-pylint-error.patch
new file mode 100644
index 0000000..68b1d8b
--- /dev/null
+++ b/debian/patches/0001-Fix-inconsistent-return-statements-pylint-error.patch
@@ -0,0 +1,42 @@
+From 82ac0491c578d5df8034e9d0cc2bf9baf4f34dbe Mon Sep 17 00:00:00 2001
+From: Benjamin Drung <bdrung at debian.org>
+Date: Thu, 1 Feb 2018 22:45:41 +0100
+Subject: [PATCH] Fix inconsistent-return-statements pylint error
+
+pylint 1.8.1 complains about pytest_pylint.py:
+R:116, 0: Either all return statements in a function should return an
+expression, or none of them should. (inconsistent-return-statements)
+
+Bug-Debian: https://bugs.debian.org/887573
+Forwarded: https://github.com/carsongee/pytest-pylint/pull/32
+---
+ pytest_pylint.py | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/pytest_pylint.py b/pytest_pylint.py
+index 1ba8de0..423da9a 100644
+--- a/pytest_pylint.py
++++ b/pytest_pylint.py
+@@ -117,9 +117,9 @@ def pytest_collect_file(path, parent):
+     """Collect files on which pylint should run"""
+     config = parent.config
+     if not config.option.pylint:
+-        return
++        return None
+     if path.ext != ".py":
+-        return
++        return None
+     rel_path = get_rel_path(path.strpath, parent.fspath.strpath)
+     if parent.pylint_config is None:
+         parent.pylint_files.add(rel_path)
+@@ -131,6 +131,7 @@ def pytest_collect_file(path, parent):
+         return PyLintItem(
+             path, parent, parent.pylint_msg_template, parent.pylintrc_file
+         )
++    return None
+ 
+ 
+ def pytest_collection_finish(session):
+-- 
+2.14.1
+
diff --git a/debian/patches/series b/debian/patches/series
index 5d3e236..e87e26e 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 0001-Removed-PEP8-py.test-plugin.patch
+0001-Fix-inconsistent-return-statements-pylint-error.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/pytest-pylint.git



More information about the Python-modules-commits mailing list