Skip to content
Snippets Groups Projects
Commit 8a38f7e8 authored by Chris's avatar Chris
Browse files

Update spacing, missing type in constructor + wrong get

parent a814fc48
Branches
No related tags found
No related merge requests found
......@@ -165,7 +165,7 @@ class BRelation:
def relationImage(self, domain: 'BSet') -> 'BSet':
result_set = set()
for domain_element in domain:
this_range_set = self.map[domain_element]
this_range_set = self.map.get(domain_element, None)
if this_range_set is None:
continue
result_set = result_set.union(this_range_set)
......
......@@ -4,6 +4,11 @@ class BBoolean:
self.__value = value
elif type(value) is str:
self.__value = str(value).lower() == "true"
elif type(value) is BBoolean:
self.__value = value.__value
def __bool__(self) -> 'bool':
return self.__value
def __and__(self, other: 'BBoolean') -> 'BBoolean':
return BBoolean(self.__value and other.__value)
......
......@@ -4,6 +4,8 @@ class BBoolean:
self.__value = value
elif type(value) is str:
self.__value = str(value).lower() == "true"
elif type(value) is BBoolean:
self.__value = value.__value
def __and__(self, other: 'BBoolean') -> 'BBoolean':
return BBoolean(self.__value and other.__value)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment