Skip to content

Commit 735367d

Browse files
committed
Don't use NoneType, for 3.7 compatibility
1 parent e9990f2 commit 735367d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

tests/resp.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import itertools
22
from contextlib import closing
3-
from types import NoneType
43
from typing import Any, Generator, List, Optional, Tuple, Union
54

65
CRNL = b"\r\n"
@@ -145,7 +144,7 @@ def encode(self, data: Any, hint: Optional[str] = None) -> bytes:
145144
return f",{data}\r\n".encode() # resp3 double
146145
return f"+{data}\r\n".encode() # simple string
147146

148-
elif isinstance(data, NoneType):
147+
elif data is None:
149148
if self.protocol > 2:
150149
return b"_\r\n" # resp3 null
151150
return b"$-1\r\n" # Null bulk string

0 commit comments

Comments
 (0)