Skip to content

Commit

Permalink
Merge pull request #159 from jhlegarreta/PreferImportingWarnings
Browse files Browse the repository at this point in the history
STYLE: Prefer importing `warnings` for the sake of consistency
  • Loading branch information
effigies authored Jan 9, 2025
2 parents ac6d730 + 5363d08 commit 8255be0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions nireports/reportlets/mosaic.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
import math
import os
import typing as ty
import warnings
from os import path as op
from typing import Literal as L
from uuid import uuid4
from warnings import warn

import matplotlib as mpl
import matplotlib.pyplot as plt
Expand Down Expand Up @@ -547,7 +547,9 @@ def plot_mosaic(
out_file = "mosaic.svg"

if plot_sagittal and views[1] is None and views[0] != "sagittal":
warn("Argument ``plot_sagittal`` for plot_mosaic() should not be used.", stacklevel=2)
warnings.warn(
"Argument ``plot_sagittal`` for plot_mosaic() should not be used.", stacklevel=2
)
views = (views[0], "sagittal", None)

# Create mask for bounding box
Expand Down

0 comments on commit 8255be0

Please sign in to comment.