Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pre-commit.ci] pre-commit autoupdate #3

Open
wants to merge 2 commits into
base: next
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v5.0.0
hooks:
- id: check-added-large-files
args: [--maxkb=8192]
Expand All @@ -12,7 +12,7 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.5
rev: v0.8.2
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand Down
3 changes: 2 additions & 1 deletion scripts/sample_usage.py
Original file line number Diff line number Diff line change
@@ -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"""
Expand Down
5 changes: 3 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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"
5 changes: 3 additions & 2 deletions tests/test_login_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions tests/test_version.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from unittest.mock import patch

import pytest

from pyoncatqt.version import get_version


Expand Down
Loading