From 0532d43b8b29bd252fc6bb63caf96b6782059993 Mon Sep 17 00:00:00 2001 From: Christian Hill Date: Fri, 14 Jan 2022 13:31:05 +0100 Subject: [PATCH] Reformatted latest changes with black --- src/pyvalem/atomic_configuration.py | 5 +++-- tests/test_atomic_configurations.py | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/pyvalem/atomic_configuration.py b/src/pyvalem/atomic_configuration.py index a8cadbf..96c83b8 100644 --- a/src/pyvalem/atomic_configuration.py +++ b/src/pyvalem/atomic_configuration.py @@ -9,8 +9,9 @@ from .state import State, StateParseError integer = pp.Word(pp.nums).setParseAction(lambda t: int(t[0])) -nocc_integer = pp.Optional(pp.Word(pp.nums), default = '1' - ).setParseAction(lambda t: int(t[0])) +nocc_integer = pp.Optional(pp.Word(pp.nums), default="1").setParseAction( + lambda t: int(t[0]) +) # NB no "j" orbital. atomic_orbital_symbols = tuple("spdfghiklmnoqrtuvwxyz") diff --git a/tests/test_atomic_configurations.py b/tests/test_atomic_configurations.py index 98baa0d..7c9a375 100644 --- a/tests/test_atomic_configurations.py +++ b/tests/test_atomic_configurations.py @@ -71,14 +71,14 @@ def test_atomic_configuration_repr(self): self.assertTrue(repr(c1) == repr(c2) == "1s2.2s2.2p6.3s2.3p6.4s2.3d3") def test_atomic_configuration_default_nocc(self): - c1 = AtomicConfiguration('1s') + c1 = AtomicConfiguration("1s") self.assertEqual(c1.nelectrons, 1) self.assertEqual(c1.orbitals[0].nocc, 1) - c2 = AtomicConfiguration('1s2.2s') + c2 = AtomicConfiguration("1s2.2s") self.assertEqual(c2.nelectrons, 3) self.assertEqual(c2.orbitals[0].nocc, 2) self.assertEqual(c2.orbitals[1].nocc, 1) - c3 = AtomicConfiguration('1s1.2s2') + c3 = AtomicConfiguration("1s1.2s2") self.assertEqual(c3.nelectrons, 3) self.assertEqual(c3.orbitals[0].nocc, 1) self.assertEqual(c3.orbitals[1].nocc, 2)