Skip to content

Commit 326ce69

Browse files
Change type to isinstance
1 parent e15e65c commit 326ce69

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pyslicer/utils/validators.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ def __init__(self, queries):
138138
def _valid_keys(self):
139139
if "fields" in self.data:
140140
value = self.data["fields"]
141-
if type(value) != list:
141+
if not isinstance(value, list):
142142
raise exceptions.InvalidQueryException(
143143
"The key 'fields' in query has a invalid value.")
144144
else:
@@ -148,7 +148,7 @@ def _valid_keys(self):
148148
"have up to 10 fields.")
149149
if "limit" in self.data:
150150
limit = self.data['limit']
151-
if type(limit) != int:
151+
if not isinstance(limit, int):
152152
raise exceptions.InvalidQueryException(
153153
"The key 'limit' in query has a invalid value.")
154154
if limit > 100:

0 commit comments

Comments
 (0)