Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jan 20, 2025
1 parent f78798c commit 9343508
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 8 deletions.
10 changes: 5 additions & 5 deletions src/garnet/home/view.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
from contextlib import suppress
from typing import Any, Dict, Optional

from garnet.helpers.ui_elements.base_lineedit import BaseLineEdit
from garnet.helpers.ui_elements.base_statusbar import BaseStatusBar
from qtpy.QtGui import QDoubleValidator
from qtpy.QtWidgets import QFormLayout, QLabel, QPushButton, QWidget

from garnet.helpers.ui_elements.base_lineedit import BaseLineEdit
from garnet.helpers.ui_elements.base_statusbar import BaseStatusBar


class HomeView(QWidget):
"""Home widget
Expand All @@ -22,14 +23,13 @@ def __init__(self: Any, parent: QWidget = None) -> None:

self.label_welcome = QLabel(self)
self.label_welcome.setText(
"Welcome to GARNET\n\nThis is still under active development and currently" "provides no functionality."
"Welcome to GARNET\n\nThis is still under active development and currentlyprovides no functionality."
)

self.plan_name = BaseLineEdit(required=True, parent=self)
self.wavelength = BaseLineEdit(required=True, default_value=1.486, parent=self)
self.plan_name.setToolTip(
"Enter the name of a reduction plan.\n"
"If the name already exists, the existing plan will be overwritten."
"Enter the name of a reduction plan.\nIf the name already exists, the existing plan will be overwritten."
)
self.wavelength.setToolTip("Set the wavelength (in Å)")

Expand Down
3 changes: 2 additions & 1 deletion tests/tabs/home/views/test_home.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
"""Test the home view"""

import pytest
from garnet.home.view import HomeView
from qtpy import QtCore

from garnet.home.view import HomeView


def test_plan_name(qtbot: pytest.fixture):
"""Test that the plan_name LineEdit is required"""
Expand Down
1 change: 1 addition & 0 deletions tests/tabs/home/views/test_welcome.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Test the welcome tab"""

import pytest

from garnet import Garnet, __version__


Expand Down
2 changes: 1 addition & 1 deletion tests/utility/test_garnet_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import pytest


@pytest.mark.datarepo()
@pytest.mark.datarepo
def test_data_repo(has_datarepo: bool, datarepo_dir: str):
"""Test for garnet-data"""
if not has_datarepo:
Expand Down
1 change: 1 addition & 0 deletions tests/utility/test_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from unittest.mock import patch

import pytest

from garnet.garnet import gui


Expand Down
3 changes: 2 additions & 1 deletion tests/utility/test_logger.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
"""Tests for the Logger class in garnet/logger.py."""

from garnet.helpers.logger import Logger
from mantid.kernel import Logger as mantid_logger # noqa: N813

from garnet.helpers.logger import Logger


def test_get_logger():
"""Test getting the logger."""
Expand Down

0 comments on commit 9343508

Please sign in to comment.