We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e15e65c commit 326ce69Copy full SHA for 326ce69
pyslicer/utils/validators.py
@@ -138,7 +138,7 @@ def __init__(self, queries):
138
def _valid_keys(self):
139
if "fields" in self.data:
140
value = self.data["fields"]
141
- if type(value) != list:
+ if not isinstance(value, list):
142
raise exceptions.InvalidQueryException(
143
"The key 'fields' in query has a invalid value.")
144
else:
@@ -148,7 +148,7 @@ def _valid_keys(self):
148
"have up to 10 fields.")
149
if "limit" in self.data:
150
limit = self.data['limit']
151
- if type(limit) != int:
+ if not isinstance(limit, int):
152
153
"The key 'limit' in query has a invalid value.")
154
if limit > 100:
0 commit comments