Skip to content

Commit

Permalink
Reformatted latest changes with black
Browse files Browse the repository at this point in the history
  • Loading branch information
xnx committed Jan 14, 2022
1 parent f58cdfe commit 0532d43
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions src/pyvalem/atomic_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
6 changes: 3 additions & 3 deletions tests/test_atomic_configurations.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0532d43

Please sign in to comment.