Skip to content

Commit

Permalink
Solve mypy variable check
Browse files Browse the repository at this point in the history
  • Loading branch information
Cristobal Pio Garcia authored and mfisherlevine committed Jul 9, 2024
1 parent 68b0498 commit 662ca70
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions python/lsst/summit/utils/imageExaminer.py
Original file line number Diff line number Diff line change
Expand Up @@ -509,9 +509,10 @@ def plotSurface(self, ax: Axes3D | None = None, useColor: bool = True) -> None:
Plot at as a surface if ``True``, else plot as a wireframe.
"""
plotDirect = False
if not ax:
fig, ax = plt.subplots(subplot_kw={"projection": "3d"}, figsize=(10, 10))
if ax is None:
_, ax = plt.subplots(subplot_kw={"projection": "3d"}, figsize=(10, 10))
plotDirect = True
assert isinstance(ax, Axes3D)

if useColor:
surf = ax.plot_surface( # noqa: F841
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ def plot_torque_data(ax: plt.Axes, dataset: M1M3ICSAnalysis) -> None:

def plot_stable_region(
fig: plt.Figure, begin: Time, end: Time, label: str = "", color: str = "b"
) -> plt.Polygon:
) -> plt.Rectangle:
"""
Highlight a stable region on the plot with a colored span.
Expand Down

0 comments on commit 662ca70

Please sign in to comment.