[master 1/8] Add pocketlint support to python-meh.

clumens installerbot-noreply at redhat.com
Thu Jul 16 19:58:01 UTC 2015


From: Chris Lumens <clumens at redhat.com>

---
 Makefile                  |  3 +++
 python-meh.spec           |  1 +
 tests/pylint/runpylint.py | 20 ++++++++++++++++++++
 3 files changed, 24 insertions(+)
 create mode 100755 tests/pylint/runpylint.py

diff --git a/Makefile b/Makefile
index 910d850..fce34a8 100644
--- a/Makefile
+++ b/Makefile
@@ -33,6 +33,9 @@ test:
 	@echo "*** Running unittests with Python 3 ***"
 	PYTHONPATH=. $(PYTHON3) $(TESTSUITE) -v
 
+check:
+	PYTHONPATH=. tests/pylint/runpylint.py
+
 install:
 	$(PYTHON) setup.py install --root=$(DESTDIR)
 	$(MAKE) -C po install
diff --git a/python-meh.spec b/python-meh.spec
index 578ab35..1da4cd8 100644
--- a/python-meh.spec
+++ b/python-meh.spec
@@ -36,6 +36,7 @@ BuildRequires: python3-setuptools
 BuildRequires: python3-dbus
 BuildRequires: libreport-python3 >= %{libreportver}
 BuildRequires: python3-six
+BuildRequires: python3-pocketlint
 %endif
 
 Requires: python
diff --git a/tests/pylint/runpylint.py b/tests/pylint/runpylint.py
new file mode 100755
index 0000000..2fbdb5c
--- /dev/null
+++ b/tests/pylint/runpylint.py
@@ -0,0 +1,20 @@
+#!/usr/bin/python3
+
+import os
+
+from pocketlint import PocketLintConfig, PocketLinter
+
+class MehLintConfig(PocketLintConfig):
+    @property
+    def pylintPlugins(self):
+        retval = super(MehLintConfig, self).pylintPlugins
+        retval.remove("pocketlint.checkers.eintr")
+        retval.remove("pocketlint.checkers.markup")
+        return retval
+
+if __name__ == "__main__":
+    conf = MehLintConfig()
+    linter = PocketLinter(conf)
+    rc = linter.run()
+    os._exit(rc)
+


-- 
To view this commit on github, visit https://github.com/rhinstaller/python-meh/commit/b276a46d23cde569c1fe456acf82728327755a0d


More information about the anaconda-patches mailing list