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 257246a commit 32f8c94Copy full SHA for 32f8c94
tifeatures/filter/filters.py
@@ -265,7 +265,7 @@ def quote_ident(s: str) -> str:
265
raise TypeError(f"{s} is not a valid identifier")
266
267
268
-def attribute(name: str, fields: List[str]) -> V:
+def attribute(name: str, fields: List[str]):
269
"""Create an attribute lookup expression using a field mapping dictionary.
270
271
:param name: the field filter name
@@ -274,6 +274,10 @@ def attribute(name: str, fields: List[str]) -> V:
274
"""
275
if name in fields:
276
return V(name)
277
+ elif name.lower() in ("true", "t", "1"):
278
+ return True
279
+ elif name.lower() in ("false", "f", "0"):
280
+ return False
281
else:
282
print(name, fields)
283
raise TypeError(f"Field {name} not in table.")
0 commit comments