Skip to content

Commit

Permalink
fix(docs): section underline matches section title (#2208)
Browse files Browse the repository at this point in the history
This PR fixes the doc section headers to have consistent lengths. It is a cause of many errors while building docs with sphinx.

This was mostly automated with ruff check --select=D409 --fix with the rule kept in pyproject.toml for future-proofing.
  • Loading branch information
mwtoews authored Jun 6, 2024
1 parent 378f354 commit 4a26cab
Show file tree
Hide file tree
Showing 48 changed files with 145 additions and 133 deletions.
2 changes: 1 addition & 1 deletion flopy/discretization/grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ class Grid:
ndarrays for the x, y, and z coordinates
Methods
----------
-------
get_coords(x, y)
transform point or array of points x, y from model coordinates to
spatial coordinates
Expand Down
2 changes: 1 addition & 1 deletion flopy/discretization/structuredgrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ class for a structured model grid
y-location points for the edges of the model grid
Methods
----------
-------
get_cell_vertices(i, j)
returns vertices for a single cell at row, column i, j.
"""
Expand Down
2 changes: 1 addition & 1 deletion flopy/discretization/vertexgrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class for a vertex model grid
returns list of cells and their vertices
Methods
----------
-------
get_cell_vertices(cellid)
returns vertices for a single cell at cellid.
Expand Down
2 changes: 1 addition & 1 deletion flopy/export/netcdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -976,7 +976,7 @@ def initialize_group(
Method to initialize a new group within a netcdf file. This group
can have independent dimensions from the global dimensions
Parameters:
Parameters
----------
name : str
name of the netcdf group
Expand Down
13 changes: 7 additions & 6 deletions flopy/export/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,10 +324,11 @@ def output_helper(
Returns
-------
None
Note:
None
Note
----
casts down double precision to single precision for netCDF files
casts down double precision to single precision for netCDF files
"""
assert isinstance(ml, (BaseModel, ModelInterface))
Expand Down Expand Up @@ -867,7 +868,7 @@ def mflist_export(f: Union[str, os.PathLike, NetCdf], mfl, **kwargs):
export helper for MfList instances
Parameters
-----------
----------
f : str or PathLike or NetCdf
file path or existing export instance type (NetCdf only for now)
mfl : MfList instance
Expand Down Expand Up @@ -1024,7 +1025,7 @@ def transient2d_export(f: Union[str, os.PathLike], t2d, fmt=None, **kwargs):
export helper for Transient2d instances
Parameters
-----------
----------
f : str or PathLike
filename or existing export instance type (NetCdf only for now)
t2d : Transient2d instance
Expand Down Expand Up @@ -1184,7 +1185,7 @@ def array3d_export(f: Union[str, os.PathLike], u3d, fmt=None, **kwargs):
export helper for Transient2d instances
Parameters
-----------
----------
f : str or PathLike
filename or existing export instance type (NetCdf only for now)
u3d : Util3d instance
Expand Down
2 changes: 1 addition & 1 deletion flopy/mbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -1678,7 +1678,7 @@ def plot(self, SelPackList=None, **kwargs):
MfList dictionary key. (default is None)
Returns
----------
-------
axes : list
Empty list is returned if filename_base is not None. Otherwise
a list of matplotlib.pyplot.axis are returned.
Expand Down
6 changes: 3 additions & 3 deletions flopy/mf6/coordinates/modeldimensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class DataDimensions:
(optional)
Methods
----------
-------
get_model_grid : ()
returns a model grid based on the current simulation data
Expand Down Expand Up @@ -151,7 +151,7 @@ class PackageDimensions:
Tuple representing the path to this package
Methods
----------
-------
get_aux_variables : (model_num=0)
returns the package's aux variables
boundnames : (model_num=0)
Expand Down Expand Up @@ -322,7 +322,7 @@ class ModelDimensions:
object containing simulation time information
Methods
----------
-------
get_model_grid : ()
returns a model grid based on the current simulation data
Expand Down
8 changes: 4 additions & 4 deletions flopy/mf6/coordinates/modelgrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class ModelCell:
id of model cell
Methods
----------
-------
See Also
--------
Expand Down Expand Up @@ -50,7 +50,7 @@ class UnstructuredModelCell(ModelCell):
name of the model
Methods
----------
-------
get_cellid : ()
returns the cellid
get_top : ()
Expand Down Expand Up @@ -341,7 +341,7 @@ class ModelGrid:
DiscretizationType.DISU)
Methods
----------
-------
grid_type : ()
returns the grid type
grid_type_consistent : ()
Expand Down Expand Up @@ -789,7 +789,7 @@ class UnstructuredModelGrid(ModelGrid):
contains all simulation related data
Methods
----------
-------
get_unstruct_jagged_array_list : {}
returns a dictionary of jagged arrays used in the unstructured grid
Expand Down
4 changes: 2 additions & 2 deletions flopy/mf6/data/mfdataarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -1531,7 +1531,7 @@ def plot(
List of unique values to be excluded from the plot.
Returns
----------
-------
out : list
Empty list is returned if filename_base is not None. Otherwise
a list of matplotlib.pyplot.axis is returned.
Expand Down Expand Up @@ -2100,7 +2100,7 @@ def plot(
extracted. (default is zero).
Returns
----------
-------
axes : list
Empty list is returned if filename_base is not None. Otherwise
a list of matplotlib.pyplot.axis is returned.
Expand Down
6 changes: 3 additions & 3 deletions flopy/mf6/data/mfdatalist.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def to_array(self, kper=0, mask=False):
return array with np.nan instead of zero
Returns
----------
-------
out : dict of numpy.ndarrays
Dictionary of 3-D numpy arrays containing the stress period data
for a selected stress period. The dictionary keys are the
Expand Down Expand Up @@ -1451,7 +1451,7 @@ def plot(
List of unique values to be excluded from the plot.
Returns
----------
-------
out : list
Empty list is returned if filename_base is not None. Otherwise
a list of matplotlib.pyplot.axis is returned.
Expand Down Expand Up @@ -2122,7 +2122,7 @@ def plot(
List of unique values to be excluded from the plot.
Returns
----------
-------
out : list
Empty list is returned if filename_base is not None. Otherwise
a list of matplotlib.pyplot.axis is returned.
Expand Down
6 changes: 3 additions & 3 deletions flopy/mf6/data/mfdataplist.py
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,7 @@ def to_array(self, kper=0, mask=False):
return array with np.nan instead of zero
Returns
----------
-------
out : dict of numpy.ndarrays
Dictionary of 3-D numpy arrays containing the stress period data
for a selected stress period. The dictionary keys are the
Expand Down Expand Up @@ -1882,7 +1882,7 @@ def plot(
List of unique values to be excluded from the plot.
Returns
----------
-------
out : list
Empty list is returned if filename_base is not None. Otherwise
a list of matplotlib.pyplot.axis is returned.
Expand Down Expand Up @@ -2604,7 +2604,7 @@ def plot(
List of unique values to be excluded from the plot.
Returns
----------
-------
out : list
Empty list is returned if filename_base is not None. Otherwise
a list of matplotlib.pyplot.axis is returned.
Expand Down
5 changes: 3 additions & 2 deletions flopy/mf6/data/mfdatascalar.py
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,8 @@ def plot(self, filename_base=None, file_extension=None, **kwargs):
"""
Helper method to plot scalar objects
Parameters:
Parameters
----------
scalar : flopy.mf6.data.mfscalar object
filename_base : str
Base file name that will be used to automatically generate file
Expand Down Expand Up @@ -976,7 +977,7 @@ def plot(
extracted. (default is zero).
Returns
----------
-------
axes : list
Empty list is returned if filename_base is not None. Otherwise
a list of matplotlib.pyplot.axis is returned.
Expand Down
2 changes: 1 addition & 1 deletion flopy/mf6/data/mfdatautil.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def list_to_array(sarr, model_grid, kper=0, mask=False):
return array with np.nan instead of zero
Returns
----------
-------
out : dict of numpy.ndarrays
Dictionary of 3-D numpy arrays containing the stress period data
for a selected stress period. The dictionary keys are the
Expand Down
6 changes: 3 additions & 3 deletions flopy/mf6/data/mfstructure.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class Dfn:
-----
Examples
----
--------
"""

def __init__(self):
Expand Down Expand Up @@ -179,7 +179,7 @@ class DfnPackage(Dfn):
-----
Examples
----
--------
"""

def __init__(self, package):
Expand Down Expand Up @@ -447,7 +447,7 @@ class DfnFile(Dfn):
-----
Examples
----
--------
"""

def __init__(self, file):
Expand Down
2 changes: 1 addition & 1 deletion flopy/mf6/mfpackage.py
Original file line number Diff line number Diff line change
Expand Up @@ -3279,7 +3279,7 @@ def plot(self, **kwargs):
MfList dictionary key. (default is None)
Returns
----------
-------
axes : list
Empty list is returned if filename_base is not None. Otherwise
a list of matplotlib.pyplot.axis are returned.
Expand Down
Loading

0 comments on commit 4a26cab

Please sign in to comment.