We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 545cfc5 commit f2824a9Copy full SHA for f2824a9
pathtraits/access.py
@@ -37,8 +37,11 @@ def get_dict(self, path):
37
res = {}
38
for cur_data in reversed(dirs_data):
39
for k, v in cur_data.items():
40
- if v and k != "path":
41
- res[k] = v
+ if not (v and k != "path"):
+ continue
42
+ if k.endswith("_BOOL"):
43
+ v = v == 1
44
+ res[k] = v
45
return res
46
47
test/test.py
@@ -23,8 +23,8 @@ def test_example(self):
23
source = pathtraits.access.get_dict(db, "test/example/EU/de.txt")
24
target = {
25
"description_TEXT": "Germany data",
26
- "has_sidecar_meta_file_BOOL": 1,
27
- "is_example_BOOL": 1,
+ "has_sidecar_meta_file_BOOL": True,
+ "is_example_BOOL": True,
28
"score_TEXT": "zero",
29
"score_REAL": 3.5,
30
}
0 commit comments