surfrdf icon indicating copy to clipboard operation
surfrdf copied to clipboard

Fix/rdf dict selection

Open franzlst opened this issue 4 years ago • 0 comments

Resource used the following statement to select the appropriate dict bases on the direct variable: rdf_dict = direct and self.__rdf_direct or self.__rdf_inverse

This has two issues: first, it is not so easy to read and second, it results in self.__rdf_inverse to be chosen, despite direct is set to True in cases where self.__rdf_direct has no values set (which is considered False when converted to a boolean).

This pull request replaces two of these occurrences with a conditional expression (ternary operator).

franzlst avatar Feb 24 '21 09:02 franzlst