Skip to content

Commit 8255be0

Browse files
authored
Merge pull request #159 from jhlegarreta/PreferImportingWarnings
STYLE: Prefer importing `warnings` for the sake of consistency
2 parents ac6d730 + 5363d08 commit 8255be0

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
@@ -547,7 +547,9 @@ def plot_mosaic(
547547
out_file = "mosaic.svg"
548548

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

553555
# Create mask for bounding box

0 commit comments

Comments
 (0)