Skip to content

Commit

Permalink
Merge pull request #3 from neutrons/pre-commit-ci-update-config
Browse files Browse the repository at this point in the history
[pre-commit.ci] pre-commit autoupdate
  • Loading branch information
peterfpeterson authored Jan 17, 2025
2 parents 04fb9a4 + 9c4075f commit a93e158
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 7 deletions.
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.9.1
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

0 comments on commit a93e158

Please sign in to comment.