Skip to content

Commit 50dd737

Browse files
casting.py: Remove uname check for WSL1
1 parent f23ca14 commit 50dd737

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

nibabel/casting.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from __future__ import annotations
77

88
import warnings
9-
from platform import machine, processor, uname
9+
from platform import machine, processor
1010

1111
import numpy as np
1212

@@ -275,12 +275,10 @@ def type_info(np_type):
275275
width=width,
276276
)
277277
# Mitigate warning from WSL1 when checking `np.longdouble` (#1309)
278-
# src for '-Microsoft': https://github.com/microsoft/WSL/issues/4555#issuecomment-536862561
279278
with warnings.catch_warnings():
280-
if uname().release.endswith('-Microsoft'):
281-
warnings.filterwarnings(
282-
action='ignore', category=UserWarning, message='Signature.*numpy.longdouble'
283-
)
279+
warnings.filterwarnings(
280+
action='ignore', category=UserWarning, message='Signature.*numpy.longdouble'
281+
)
284282
info = np.finfo(dt)
285283

286284
# Trust the standard IEEE types

0 commit comments

Comments
 (0)