From 7d7f1724ff7fd9c5dbe6f78b63cc81f6ebf6a90d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Thu, 2 Mar 2017 00:16:13 +0100 Subject: [PATCH] make pylint happy Add mock dbus module --- .travis.yml | 2 +- ci/pylintrc | 1 + qubesmgmt/vm/__init__.py | 1 + test-packages/dbus.py | 8 ++++++++ 4 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 test-packages/dbus.py diff --git a/.travis.yml b/.travis.yml index 101e1c0..1aa1200 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,7 +9,7 @@ install: - pip install --quiet -r ci/requirements.txt - git clone https://github.com/"${TRAVIS_REPO_SLUG%%/*}"/qubes-builder ~/qubes-builder script: - - test -z "$TESTS_ONLY" || pylint --rcfile=ci/pylintrc qubesmgmt + - test -z "$TESTS_ONLY" || PYTHONPATH=test-packages pylint --rcfile=ci/pylintrc qubesmgmt - test -z "$TESTS_ONLY" || ./run-tests - test -n "$TESTS_ONLY" || ~/qubes-builder/scripts/travis-build env: diff --git a/ci/pylintrc b/ci/pylintrc index d7e7771..9bbf98b 100644 --- a/ci/pylintrc +++ b/ci/pylintrc @@ -19,6 +19,7 @@ output-format=colorized reports=yes [TYPECHECK] +ignored-classes=dbus,SystemBus,SessionBus [BASIC] diff --git a/qubesmgmt/vm/__init__.py b/qubesmgmt/vm/__init__.py index c93fb8c..9dc8a99 100644 --- a/qubesmgmt/vm/__init__.py +++ b/qubesmgmt/vm/__init__.py @@ -129,6 +129,7 @@ class QubesVM(qubesmgmt.base.PropertyHolder): vm=self.name, vm_name=volname) return self._volumes +# pylint: disable=abstract-method class AdminVM(QubesVM): '''Dom0''' pass diff --git a/test-packages/dbus.py b/test-packages/dbus.py new file mode 100644 index 0000000..7f626c7 --- /dev/null +++ b/test-packages/dbus.py @@ -0,0 +1,8 @@ +class DBusException(Exception): + pass + +class SystemBus(object): + pass + +class SessionBus(object): + pass