chore: switches from black and isort to ruff

This commit is contained in:
2026-02-26 17:40:26 -03:00
parent d89124b1e8
commit 5d76e49f89
20 changed files with 286 additions and 77 deletions

View File

@@ -103,11 +103,14 @@ class TestMolecule(unittest.TestCase):
Atom(lbl=1, na=1, rx=0.0, ry=0.0, rz=0.0, chg=1.0, eps=1.0, sig=1.0)
)
expected_evals, expected_evecs = [0.0, 0.0, 0.0], [
[1.0, 0.0, 0.0],
[0.0, 1.0, 0.0],
[0.0, 0.0, 1.0],
]
expected_evals, expected_evecs = (
[0.0, 0.0, 0.0],
[
[1.0, 0.0, 0.0],
[0.0, 1.0, 0.0],
[0.0, 0.0, 1.0],
],
)
evals, evecs = mol.principal_axes()

View File

@@ -1,4 +1,3 @@
from diceplayer.shared.environment.atom import Atom
from diceplayer.shared.environment.molecule import Molecule
from diceplayer.shared.environment.system import System

View File

@@ -309,7 +309,7 @@ class TestDiceInterface(unittest.TestCase):
self.assertTrue(mock_os.getcwd.called)
self.assertTrue(mock_os.chdir.called)
self.assertEqual(dice.run_dice_file.call_count, 1)
self.assertEqual(dice.run_dice_file.call_count, 2)
self.assertTrue(mock_shutils.copy.called)
@mock.patch("diceplayer.shared.interface.dice_interface.os")
@@ -317,7 +317,7 @@ class TestDiceInterface(unittest.TestCase):
@mock.patch(
"diceplayer.shared.interface.dice_interface.Path.exists", return_value=False
)
def test_run_dice_on_second_cycle_run_successful(
def test_run_dice_raises_filenotfound_on_invalid_file(
self, mock_path_exists, mock_shutils, mock_os
):
dice = DiceInterface()