Skip to content

Commit 3bc39ed

Browse files
Apply black to lint updated files for PR
1 parent 3d1507c commit 3bc39ed

File tree

3 files changed

+10
-16
lines changed

3 files changed

+10
-16
lines changed

cf/mixin/fielddomain.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2490,7 +2490,8 @@ def del_construct(self, *identity, default=ValueError(), **filter_kwargs):
24902490
cyclic_axes = self._cyclic.copy()
24912491

24922492
deld_construct = super().del_construct(
2493-
*identity, default=default, **filter_kwargs)
2493+
*identity, default=default, **filter_kwargs
2494+
)
24942495

24952496
# If the construct deleted was a cyclic axes, remove it from the set
24962497
# of stored cyclic axes, to update that appropriately. Do this
@@ -2499,13 +2500,13 @@ def del_construct(self, *identity, default=ValueError(), **filter_kwargs):
24992500
if key in cyclic_axes:
25002501
# The below is to test that the construct was successfully deleted
25012502
if isinstance(default, Exception) or (
2502-
not isinstance(default, Exception)
2503-
and deld_construct != default
2503+
not isinstance(default, Exception)
2504+
and deld_construct != default
25042505
):
25052506
cyclic_axes.remove(key)
25062507
self._cyclic = cyclic_axes
25072508
logger.info(
2508-
"Deleted a construct that corresponds to a cyclic axis "
2509+
"Deleted a construct that corresponds to a cyclic axis "
25092510
f"({key}), so it was removed from the cyclic() axes set."
25102511
)
25112512

cf/test/test_Domain.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -410,9 +410,7 @@ def test_Domain_del_construct(self):
410410
d.del_construct("auxiliarycoordinate1", default=None)
411411
)
412412

413-
self.assertIsInstance(
414-
d.del_construct("measure:area"), cf.CellMeasure
415-
)
413+
self.assertIsInstance(d.del_construct("measure:area"), cf.CellMeasure)
416414

417415
# NOTE: this test will fail presently because of a bug which means
418416
# that Field.domain doesn't inherit the cyclic() axes of the
@@ -427,11 +425,10 @@ def test_Domain_del_construct(self):
427425
e.del_construct("dimensioncoordinate2"), cf.DimensionCoordinate
428426
)
429427
self.assertEqual(e.cyclic(), set(("domainaxis2",)))
430-
self.assertIsInstance(
431-
e.del_construct("domainaxis2"), cf.DomainAxis
432-
)
428+
self.assertIsInstance(e.del_construct("domainaxis2"), cf.DomainAxis)
433429
self.assertEqual(e.cyclic(), set())
434430

431+
435432
if __name__ == "__main__":
436433
print("Run date:", datetime.datetime.now())
437434
cf.environment()

cf/test/test_Field.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2589,9 +2589,7 @@ def test_Field_del_construct(self):
25892589
f.del_construct("auxiliarycoordinate1", default=None)
25902590
)
25912591

2592-
self.assertIsInstance(
2593-
f.del_construct("measure:area"), cf.CellMeasure
2594-
)
2592+
self.assertIsInstance(f.del_construct("measure:area"), cf.CellMeasure)
25952593

25962594
# Test a field with cyclic axes, to ensure the cyclic() set is
25972595
# updated accordingly if a cyclic axes is the one removed.
@@ -2602,9 +2600,7 @@ def test_Field_del_construct(self):
26022600
g.del_construct("dimensioncoordinate2"), cf.DimensionCoordinate
26032601
)
26042602
self.assertEqual(g.cyclic(), set(("domainaxis2",)))
2605-
self.assertIsInstance(
2606-
g.del_construct("domainaxis2"), cf.DomainAxis
2607-
)
2603+
self.assertIsInstance(g.del_construct("domainaxis2"), cf.DomainAxis)
26082604
self.assertEqual(g.cyclic(), set())
26092605

26102606
def test_Field_persist(self):

0 commit comments

Comments
 (0)