Skip to content

Commit 2560d54

Browse files
committed
Make black happy...
1 parent 938dc9d commit 2560d54

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/graphql/pyutils/is_nullish.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1+
import math
12
from typing import Any
2-
from math import isnan
33

44
from ..error import INVALID
55

@@ -8,5 +8,8 @@
88

99
def is_nullish(value: Any) -> bool:
1010
"""Return true if a value is null, undefined, or NaN."""
11-
return value is None or value is INVALID or (
12-
isinstance(value, float) and isnan(value))
11+
return (
12+
value is None
13+
or value is INVALID
14+
or (isinstance(value, float) and math.isnan(value))
15+
)

tests/pyutils/test_is_nullish.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,3 @@ def nan_is_nullish():
4848

4949
def numpy_arrays_are_not_nullish():
5050
assert is_nullish(FakeNumpyArray()) is False
51-

0 commit comments

Comments
 (0)