Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/rdf dict selection #33

Open
wants to merge 15 commits into
base: master
Choose a base branch
from

Conversation

franzlst
Copy link

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants