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 Jun 30, 2024
1 parent 8761f4a commit 9fa6c41
Show file tree
Hide file tree
Showing 12 changed files with 23 additions and 19 deletions.
3 changes: 2 additions & 1 deletion src/dxtb/_src/io/output/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@
import platform

import torch
from dxtb._src.typing import Any

from dxtb.__version__ import __tversion__
from dxtb._src.typing import Any

__all__ = [
"get_mkl_num_threads",
Expand Down
2 changes: 1 addition & 1 deletion src/dxtb/_src/loader/lazy/lazy_var.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@

import importlib

from dxtb._src.typing import Any, Callable, Sequence, Mapping
from dxtb._src.typing import Any, Callable, Mapping, Sequence

__all__ = ["attach_var", "attach_vars"]

Expand Down
2 changes: 1 addition & 1 deletion test/test_integrals/test_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
import pytest
import torch

from dxtb.integrals import types as inttypes
from dxtb import GFN1_XTB, GFN2_XTB, IndexHelper
from dxtb.integrals import types as inttypes

numbers = torch.tensor([14, 1, 1, 1, 1])

Expand Down
2 changes: 1 addition & 1 deletion test/test_integrals/test_wrappers.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
import pytest
import torch

from dxtb.integrals import wrappers
from dxtb import GFN1_XTB, GFN2_XTB, Param
from dxtb.integrals import wrappers

numbers = torch.tensor([14, 1, 1, 1, 1])
positions = torch.tensor(
Expand Down
6 changes: 3 additions & 3 deletions test/test_io/test_outputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@
"""
from __future__ import annotations

from unittest.mock import patch, MagicMock
from unittest.mock import MagicMock, patch

import pytest

from dxtb import __version__
from dxtb._src.io.output import (
get_mkl_num_threads,
get_omp_num_threads,
get_python_version,
get_pytorch_version_short,
get_short_version,
get_mkl_num_threads,
get_omp_num_threads,
get_system_info,
)

Expand Down
4 changes: 3 additions & 1 deletion test/test_loader/test_lazy/test_attach_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@

from __future__ import annotations

import pytest
from unittest.mock import patch

import pytest

from dxtb._src.loader.lazy import attach_module


Expand Down
7 changes: 3 additions & 4 deletions test/test_loader/test_lazy/test_attach_var.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,11 @@

from __future__ import annotations

import pytest
from unittest.mock import patch
from dxtb._src.loader.lazy import attach_var, attach_vars
from unittest.mock import MagicMock, patch

import pytest
from unittest.mock import patch, MagicMock

from dxtb._src.loader.lazy import attach_var, attach_vars


def test_attach_var_imports_variables():
Expand Down
7 changes: 4 additions & 3 deletions test/test_loader/test_lazy/test_param.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,12 @@

from __future__ import annotations

from dxtb._src.loader.lazy import LazyLoaderParam
import pytest
import pytest
from pathlib import Path

import pytest

from dxtb._src.loader.lazy import LazyLoaderParam


def test_lazy_loader_param_initialization() -> None:
filepath = "test.toml"
Expand Down
2 changes: 1 addition & 1 deletion test/test_scf/test_general.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ def test_properties() -> None:


def test_fail() -> None:
from dxtb.calculators import EnergyCalculator
from dxtb import GFN1_XTB
from dxtb.calculators import EnergyCalculator

numbers = torch.tensor([1])
positions = torch.tensor([[0.0, 0.0, 0.0]])
Expand Down
1 change: 0 additions & 1 deletion test/test_singlepoint/test_general.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@

import pytest
import torch

from tad_mctc.io import read

from dxtb import GFN1_XTB as par
Expand Down
1 change: 1 addition & 0 deletions test/test_singlepoint/test_grad.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import pytest
import torch
from tad_mctc.io import read

from dxtb import GFN1_XTB as par
from dxtb import Calculator
from dxtb._src.constants import labels
Expand Down
5 changes: 3 additions & 2 deletions test/test_utils/test_timer.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@

from __future__ import annotations

from unittest.mock import patch

import pytest

from dxtb._src.timing.timer import TimerError, _Timers, _sync
from unittest.mock import patch
from dxtb._src.timing.timer import TimerError, _sync, _Timers


def test_fail() -> None:
Expand Down

0 comments on commit 9fa6c41

Please sign in to comment.