Skip to content

Commit 5363d08

Browse files
committed
STYLE: Prefer importing warnings for the sake of consistency
Prefer importing `warnings` for the sake of consistency with the rest of the code base.
1 parent d88ca78 commit 5363d08

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

nireports/reportlets/mosaic.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@
2727
import math
2828
import os
2929
import typing as ty
30+
import warnings
3031
from os import path as op
3132
from typing import Literal as L
3233
from uuid import uuid4
33-
from warnings import warn
3434

3535
import matplotlib as mpl
3636
import matplotlib.pyplot as plt
@@ -546,7 +546,9 @@ def plot_mosaic(
546546
out_file = "mosaic.svg"
547547

548548
if plot_sagittal and views[1] is None and views[0] != "sagittal":
549-
warn("Argument ``plot_sagittal`` for plot_mosaic() should not be used.", stacklevel=2)
549+
warnings.warn(
550+
"Argument ``plot_sagittal`` for plot_mosaic() should not be used.", stacklevel=2
551+
)
550552
views = (views[0], "sagittal", None)
551553

552554
# Create mask for bounding box

0 commit comments

Comments
 (0)