Skip to content

Commit fd22520

Browse files
committed
Reformatted code base with black.
1 parent 09c3c49 commit fd22520

File tree

356 files changed

+31228
-20172
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

356 files changed

+31228
-20172
lines changed

openmc/_xml.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,23 @@ def clean_indentation(element, level=0, spaces_per_level=2, trailing_indent=True
1414
Whether or not to add indentation after closing the element
1515
1616
"""
17-
i = "\n" + level*spaces_per_level*" "
17+
i = "\n" + level * spaces_per_level * " "
1818

1919
# ensure there's always some tail for the element passed in
2020
if not element.tail:
2121
element.tail = ""
2222

2323
if len(element):
2424
if not element.text or not element.text.strip():
25-
element.text = i + spaces_per_level*" "
25+
element.text = i + spaces_per_level * " "
2626
if trailing_indent and (not element.tail or not element.tail.strip()):
2727
element.tail = i
2828
for sub_element in element:
2929
# `trailing_indent` is intentionally not forwarded to the recursive
3030
# call. Any child element of the topmost element should add
3131
# indentation at the end to ensure its parent's indentation is
3232
# correct.
33-
clean_indentation(sub_element, level+1, spaces_per_level)
33+
clean_indentation(sub_element, level + 1, spaces_per_level)
3434
if not sub_element.tail or not sub_element.tail.strip():
3535
sub_element.tail = i
3636
else:
@@ -82,7 +82,7 @@ def reorder_attributes(root):
8282

8383

8484
def get_elem_tuple(elem, name, dtype=int):
85-
'''Helper function to get a tuple of values from an elem
85+
"""Helper function to get a tuple of values from an elem
8686
8787
Parameters
8888
----------
@@ -97,7 +97,7 @@ def get_elem_tuple(elem, name, dtype=int):
9797
-------
9898
tuple of dtype
9999
Data read from the tuple
100-
'''
100+
"""
101101
subelem = elem.find(name)
102102
if subelem is not None:
103103
return tuple([dtype(x) for x in subelem.text.split()])

0 commit comments

Comments
 (0)