make pylint happy

Add mock dbus module
This commit is contained in:
Marek Marczykowski-Górecki 2017-03-02 00:16:13 +01:00
parent e826ebff53
commit 7d7f1724ff
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724
4 changed files with 11 additions and 1 deletions

View File

@ -9,7 +9,7 @@ install:
- pip install --quiet -r ci/requirements.txt - pip install --quiet -r ci/requirements.txt
- git clone https://github.com/"${TRAVIS_REPO_SLUG%%/*}"/qubes-builder ~/qubes-builder - git clone https://github.com/"${TRAVIS_REPO_SLUG%%/*}"/qubes-builder ~/qubes-builder
script: 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 -z "$TESTS_ONLY" || ./run-tests
- test -n "$TESTS_ONLY" || ~/qubes-builder/scripts/travis-build - test -n "$TESTS_ONLY" || ~/qubes-builder/scripts/travis-build
env: env:

View File

@ -19,6 +19,7 @@ output-format=colorized
reports=yes reports=yes
[TYPECHECK] [TYPECHECK]
ignored-classes=dbus,SystemBus,SessionBus
[BASIC] [BASIC]

View File

@ -129,6 +129,7 @@ class QubesVM(qubesmgmt.base.PropertyHolder):
vm=self.name, vm_name=volname) vm=self.name, vm_name=volname)
return self._volumes return self._volumes
# pylint: disable=abstract-method
class AdminVM(QubesVM): class AdminVM(QubesVM):
'''Dom0''' '''Dom0'''
pass pass

8
test-packages/dbus.py Normal file
View File

@ -0,0 +1,8 @@
class DBusException(Exception):
pass
class SystemBus(object):
pass
class SessionBus(object):
pass