Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Correct the formatting for single line doc strings.

Co-authored-by: Xylar Asay-Davis <[email protected]>
  • Loading branch information
andrewdnolan and xylar committed Dec 19, 2024
1 parent d196b6b commit 1c951b5
Showing 1 changed file with 8 additions and 13 deletions.
21 changes: 8 additions & 13 deletions mosaic/descriptor.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@


def attr_to_bool(attr: str):
"""Format attribute strings and return a boolean value
"""
""" Format attribute strings and return a boolean value """
match attr.strip().upper():
case "YES":
return True
Expand Down Expand Up @@ -186,8 +185,7 @@ def fix_outofbounds_indices(ds: Dataset, array_name: str) -> Dataset:

@property
def projection(self) -> CRS:
"""The target projection for plotting.
"""
""" The target projection for plotting. """
return self._projection

@projection.setter
Expand Down Expand Up @@ -216,15 +214,15 @@ def projection(self, projection: CRS) -> None:

@property
def latlon(self) -> bool:
"""Boolean whether the lat/lon coordinate arrays should be used for
"""
Boolean whether the lat/lon coordinate arrays should be used for
patch construction.
"""
return self._latlon

@latlon.setter
def latlon(self, value) -> None:
"""TODO: check that the passed value is consistent with transform
"""
""" TODO: check that the passed value is consistent with transform """
if self.is_spherical:
value = True

Expand Down Expand Up @@ -372,8 +370,7 @@ def _fix_antimeridian(self, patches, loc, projection=None):


def _compute_cell_patches(ds: Dataset) -> ndarray:
"""Create cell patches (i.e. Primary cells) for an MPAS mesh.
"""
"""Create cell patches (i.e. Primary cells) for an MPAS mesh."""
# get the maximum number of edges on a cell
maxEdges = ds.sizes["maxEdges"]
# connectivity arrays have already been zero indexed
Expand All @@ -396,8 +393,7 @@ def _compute_cell_patches(ds: Dataset) -> ndarray:


def _compute_edge_patches(ds: Dataset) -> ndarray:
"""Create edge patches for an MPAS mesh.
"""
"""Create edge patches for an MPAS mesh."""

# connectivity arrays have already been zero indexed
cellsOnEdge = ds.cellsOnEdge
Expand Down Expand Up @@ -430,8 +426,7 @@ def _compute_edge_patches(ds: Dataset) -> ndarray:


def _compute_vertex_patches(ds: Dataset) -> ndarray:
"""Create vertex patches (i.e. Dual Cells) for an MPAS mesh.
"""
"""Create vertex patches (i.e. Dual Cells) for an MPAS mesh."""
nVertices = ds.sizes["nVertices"]
vertexDegree = ds.sizes["vertexDegree"]

Expand Down

0 comments on commit 1c951b5

Please sign in to comment.