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 Dec 2, 2021
1 parent f0f7715 commit 37bf142
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions glotaran/builtin/io/folder/test/test_folder_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

import pytest

from glotaran.io import save_result
from glotaran.analysis.optimize import optimize
from glotaran.examples.sequential_spectral_decay import SCHEME
from glotaran.io import save_result
from glotaran.project.result import Result


Expand All @@ -21,7 +21,7 @@ def dummy_result():
@pytest.mark.parametrize("format_name", ("folder", "legacy"))
def test_save_result_folder(
tmp_path: Path,
dummy_result: Result, # noqa: F811
dummy_result: Result,
format_name: Literal["folder", "legacy"],
):
"""Check all files exist."""
Expand All @@ -48,7 +48,7 @@ def test_save_result_folder(
@pytest.mark.parametrize("format_name", ("folder", "legacy"))
def test_save_result_folder_error_path_is_file(
tmp_path: Path,
dummy_result: Result, # noqa: F811
dummy_result: Result,
format_name: Literal["folder", "legacy"],
):
"""Raise error if result_path is a file without extension and overwrite is true."""
Expand Down
7 changes: 4 additions & 3 deletions glotaran/builtin/io/yml/test/test_save_result.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
from __future__ import annotations

from dataclasses import replace
from pathlib import Path
from textwrap import dedent

import pytest
from dataclasses import replace

from glotaran import __version__
from glotaran.io import save_result
from glotaran.analysis.optimize import optimize
from glotaran.examples.sequential_spectral_decay import SCHEME
from glotaran.io import save_result
from glotaran.project.result import Result


Expand All @@ -22,7 +23,7 @@ def dummy_result():

def test_save_result_yml(
tmp_path: Path,
dummy_result: Result, # noqa: F811
dummy_result: Result,
):
"""Check all files exist."""
expected = dedent(
Expand Down
5 changes: 2 additions & 3 deletions glotaran/deprecation/modules/test/test_project_result.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
"""Test deprecated functionality in 'glotaran.project.result'."""
from __future__ import annotations


import pytest

from glotaran.analysis.optimize import optimize
Expand All @@ -17,7 +16,7 @@ def dummy_result():
yield optimize(SCHEME, raise_exception=True)


def test_Result_get_dataset_method(dummy_result: Result): # noqa: F811
def test_Result_get_dataset_method(dummy_result: Result):
"""Result.get_dataset(dataset_label) gives correct dataset."""

_, result = deprecation_warning_on_call_test_helper(
Expand All @@ -27,7 +26,7 @@ def test_Result_get_dataset_method(dummy_result: Result): # noqa: F811
assert result == dummy_result.data["dataset_1"]


def test_Result_get_dataset_method_error(dummy_result: Result): # noqa: F811
def test_Result_get_dataset_method_error(dummy_result: Result):
"""Result.get_dataset(dataset_label) error on wrong key."""

with pytest.raises(ValueError, match="Unknown dataset 'foo'"):
Expand Down

0 comments on commit 37bf142

Please sign in to comment.