Small fixes
This commit is contained in:
parent
d2b0bb2f55
commit
38db3ea0f7
2 changed files with 5 additions and 3 deletions
|
|
@ -445,9 +445,11 @@ class Conformance:
|
||||||
candidate_element, = self.bottom.read_outgoing_elements(self.type_model, candidate_name)
|
candidate_element, = self.bottom.read_outgoing_elements(self.type_model, candidate_name)
|
||||||
candidate_source = self.type_model_names[self.bottom.read_edge_source(candidate_element)]
|
candidate_source = self.type_model_names[self.bottom.read_edge_source(candidate_element)]
|
||||||
if candidate_source not in source_candidates:
|
if candidate_source not in source_candidates:
|
||||||
|
if len(source_candidates.intersection(set(self.sub_types[candidate_source]))) == 0:
|
||||||
remove.add(candidate_name)
|
remove.add(candidate_name)
|
||||||
candidate_target = self.type_model_names[self.bottom.read_edge_target(candidate_element)]
|
candidate_target = self.type_model_names[self.bottom.read_edge_target(candidate_element)]
|
||||||
if candidate_target not in target_candidates:
|
if candidate_target not in target_candidates:
|
||||||
|
if len(target_candidates.intersection(set(self.sub_types[candidate_target]))) == 0:
|
||||||
remove.add(candidate_name)
|
remove.add(candidate_name)
|
||||||
self.candidates[m_name] = self.candidates[m_name].difference(remove)
|
self.candidates[m_name] = self.candidates[m_name].difference(remove)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,7 @@ def main():
|
||||||
'filter': lambda x: False if x.lower() == 'false' else x
|
'filter': lambda x: False if x.lower() == 'false' else x
|
||||||
})
|
})
|
||||||
args = prompt(args_questions)
|
args = prompt(args_questions)
|
||||||
args = {k: types[k](v) for k, v in args.items()}
|
args = {k: types[k](v) if len(v) > 0 else None for k, v in args.items()}
|
||||||
try:
|
try:
|
||||||
output = method(**args)
|
output = method(**args)
|
||||||
if output is not None:
|
if output is not None:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue