mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-12-08 08:33:29 +00:00
Fix pylint in ubuntutools/test/test_requestsync.py
pylint complains:
```
ubuntutools/test/test_requestsync.py:31:12: C0415: Import outside toplevel (keyring) (import-outside-toplevel)
ubuntutools/test/test_requestsync.py:33:12: W0707: Consider explicitly re-raising using 'except ModuleNotFoundError as exc' and 'raise ModuleNotFoundError('package python3-keyring is not installed') from exc' (raise-missing-from)
ubuntutools/test/test_requestsync.py:31:12: W0611: Unused import keyring (unused-import)
```
This commit is contained in:
parent
768a517370
commit
c8fe724560
@ -28,6 +28,7 @@ class BinaryTests(unittest.TestCase):
|
|||||||
def test_keyring_installed(self):
|
def test_keyring_installed(self):
|
||||||
"""Smoke test for required lp api dependencies"""
|
"""Smoke test for required lp api dependencies"""
|
||||||
try:
|
try:
|
||||||
|
# pylint: disable-next=import-outside-toplevel,unused-import
|
||||||
import keyring # noqa: F401
|
import keyring # noqa: F401
|
||||||
except ModuleNotFoundError:
|
except ModuleNotFoundError as error:
|
||||||
raise ModuleNotFoundError("package python3-keyring is not installed")
|
raise ModuleNotFoundError("package python3-keyring is not installed") from error
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user