From 003134b1ba40ceb4ef851cf0f03fe8c8b31bea20 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 25 Nov 2024 22:16:29 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- scripts/sample_usage.py | 3 ++- tests/conftest.py | 5 +++-- tests/test_login_dialog.py | 5 +++-- tests/test_version.py | 1 + 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/scripts/sample_usage.py b/scripts/sample_usage.py index 1aeef88..de1d09d 100644 --- a/scripts/sample_usage.py +++ b/scripts/sample_usage.py @@ -1,8 +1,9 @@ import sys -from pyoncatqt.login import ONCatLogin from qtpy.QtWidgets import QApplication, QLabel, QListWidget, QVBoxLayout, QWidget +from pyoncatqt.login import ONCatLogin + class MainWindow(QWidget): """Main widget""" diff --git a/tests/conftest.py b/tests/conftest.py index d9a1549..aab8b6a 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,8 +1,9 @@ import os -import pyoncatqt.configuration import pytest +import pyoncatqt.configuration + @pytest.fixture(autouse=True) def _config_path(monkeypatch: pytest.fixture) -> None: @@ -16,6 +17,6 @@ def _get_login(monkeypatch: pytest.fixture) -> None: monkeypatch.setattr(os, "getlogin", lambda: "test") -@pytest.fixture() +@pytest.fixture def token_path() -> str: return "tests/data/token.json" diff --git a/tests/test_login_dialog.py b/tests/test_login_dialog.py index 54e5ee9..514fb4a 100644 --- a/tests/test_login_dialog.py +++ b/tests/test_login_dialog.py @@ -6,11 +6,12 @@ import oauthlib import pyoncat import pytest -from pyoncatqt.configuration import get_data -from pyoncatqt.login import ONCatLogin, ONCatLoginDialog from qtpy import QtCore from qtpy.QtWidgets import QApplication, QDialog, QLineEdit, QPushButton +from pyoncatqt.configuration import get_data +from pyoncatqt.login import ONCatLogin, ONCatLoginDialog + def check_status(login_status: bool) -> None: assert login_status diff --git a/tests/test_version.py b/tests/test_version.py index fc3ea0c..16970b1 100644 --- a/tests/test_version.py +++ b/tests/test_version.py @@ -1,6 +1,7 @@ from unittest.mock import patch import pytest + from pyoncatqt.version import get_version