From 62f35ee0642a1152e5ded31f42830809fed7b915 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 14 Nov 2017 09:05:28 +0100 Subject: [PATCH] Fix lint --- qutebrowser/utils/version.py | 4 +++- tests/unit/utils/test_version.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/qutebrowser/utils/version.py b/qutebrowser/utils/version.py index e8c734acc..47cbf6eff 100644 --- a/qutebrowser/utils/version.py +++ b/qutebrowser/utils/version.py @@ -28,10 +28,10 @@ import subprocess import importlib import collections import enum -import pkg_resources import datetime import attr +import pkg_resources from PyQt5.QtCore import PYQT_VERSION_STR, QLibraryInfo from PyQt5.QtNetwork import QSslSocket from PyQt5.QtGui import (QOpenGLContext, QOpenGLVersionProfile, @@ -325,6 +325,7 @@ def _backend(): assert objects.backend == webengine, objects.backend return 'QtWebEngine (Chromium {})'.format(_chromium_version()) + def _uptime() -> datetime.timedelta: launch_time = QApplication.instance().launch_time time_delta = datetime.datetime.now() - launch_time @@ -332,6 +333,7 @@ def _uptime() -> datetime.timedelta: time_delta -= datetime.timedelta(microseconds=time_delta.microseconds) return time_delta + def version(): """Return a string with various version informations.""" lines = ["qutebrowser v{}".format(qutebrowser.__version__)] diff --git a/tests/unit/utils/test_version.py b/tests/unit/utils/test_version.py index 9f37fcca1..3d01fcfb5 100644 --- a/tests/unit/utils/test_version.py +++ b/tests/unit/utils/test_version.py @@ -30,10 +30,10 @@ import types import importlib import logging import textwrap -import pkg_resources import datetime import attr +import pkg_resources import pytest import qutebrowser