Skip to content

Commit

Permalink
Run black.
Browse files Browse the repository at this point in the history
  • Loading branch information
Bradley Meyer committed Jul 14, 2022
1 parent b1049ae commit f1b3da4
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 36 deletions.
24 changes: 13 additions & 11 deletions wnutils/h5.py
Expand Up @@ -13,13 +13,13 @@
class H5(wnb.Base):
"""A class for reading and plotting webnucleo HDF5 files.
Each instance corresponds to an hdf5 file. Methods extract
data and plot data from the file.
Each instance corresponds to an hdf5 file. Methods extract
data and plot data from the file.
Args:
``file`` (:obj:`str`): The name of the hdf5 file.
Args:
``file`` (:obj:`str`): The name of the hdf5 file.
"""
"""

def __init__(self, file):
self._h5file = h5py.File(file, "r")
Expand Down Expand Up @@ -151,12 +151,12 @@ def get_nuclide_data(self):
def get_group_mass_fractions(self, group):
"""Method to return mass fractions from a group in an hdf5 file.
Args:
``group`` (:obj:`str`): The name of the group.
Args:
``group`` (:obj:`str`): The name of the group.
Returns:
:obj:`h5py:Dataset`: A 2d hdf5 dataset. The first index
indicates the zone and the second the species.
Returns:
:obj:`h5py:Dataset`: A 2d hdf5 dataset. The first index
indicates the zone and the second the species.
"""

Expand Down Expand Up @@ -674,7 +674,9 @@ def plot_group_properties_vs_property(

if plotParams:
if len(plotParams) != len(props):
print("Number of plotParam elements must equal" + " number of properties.")
print(
"Number of plotParam elements must equal" + " number of properties."
)
return

x = self.get_group_properties_in_zones_as_floats(group, [prop])[prop]
Expand Down
10 changes: 5 additions & 5 deletions wnutils/multi_h5.py
Expand Up @@ -7,13 +7,13 @@
class Multi_H5(wb.Base):
"""A class for reading and plotting webnucleo multiple HDF5 files.
Each instance corresponds to a set of HDF5 files. Methods
plot data from the files.
Each instance corresponds to a set of HDF5 files. Methods
plot data from the files.
Args:
``files`` (:obj:`list`): The names of the HDF5 files.
Args:
``files`` (:obj:`list`): The names of the HDF5 files.
"""
"""

def __init__(self, files):
self._files = files
Expand Down
10 changes: 5 additions & 5 deletions wnutils/multi_xml.py
Expand Up @@ -7,13 +7,13 @@
class Multi_Xml(wb.Base):
"""A class for reading and plotting webnucleo multiple xml files.
Each instance corresponds to a set of xml files. Methods
plot data from the files.
Each instance corresponds to a set of xml files. Methods
plot data from the files.
Args:
``files`` (:obj:`list`): The names of the xml files.
Args:
``files`` (:obj:`list`): The names of the xml files.
"""
"""

def __init__(self, files):
self._files = files
Expand Down
28 changes: 13 additions & 15 deletions wnutils/xml.py
Expand Up @@ -10,9 +10,7 @@


class Reaction(wb.Base):
"""A class for storing and retrieving data about reactions.
"""
"""A class for storing and retrieving data about reactions."""

def __init__(self):
self.reactants = []
Expand Down Expand Up @@ -310,13 +308,13 @@ def get_string(self):
class Xml(wb.Base):
"""A class for reading and plotting webnucleo xml files.
Each instance corresponds to an xml file. Methods extract
data and plot data from the file.
Each instance corresponds to an xml file. Methods extract
data and plot data from the file.
Args:
``file`` (:obj:`str`): The name of the xml file.
Args:
``file`` (:obj:`str`): The name of the xml file.
"""
"""

def __init__(self, file):
parser = etree.XMLParser(remove_blank_text=True)
Expand Down Expand Up @@ -1500,15 +1498,15 @@ def get_zone_data(self, zone_xpath=""):
class New_Xml(wb.Base):
"""A class for creating webnucleo xml files.
Each instance corresponds to new xml. Methods set
the nuclide, reaction, or zone data or write the xml to a file.
Each instance corresponds to new xml. Methods set
the nuclide, reaction, or zone data or write the xml to a file.
Args:
``xml_type`` (:obj:`str`, optional): The type of xml file to
be created ("nuclear_data", "reaction_data", "nuclear_network",
"zone_data", or "libnucnet_input"). Defaults to "nuclear_network".
Args:
``xml_type`` (:obj:`str`, optional): The type of xml file to
be created ("nuclear_data", "reaction_data", "nuclear_network",
"zone_data", or "libnucnet_input"). Defaults to "nuclear_network".
"""
"""

def __init__(self, xml_type="nuclear_network"):
if xml_type not in [
Expand Down

0 comments on commit f1b3da4

Please sign in to comment.