-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Fixed Inconsistent return statements #467
base: main
Are you sure you want to change the base?
Fixed Inconsistent return statements #467
Conversation
sbol3/document.py
Outdated
elif lines_type is str: | ||
# rdflib 6 | ||
return '\n'.join(lines) + '\n' | ||
else: | ||
return '' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of returning an empty string I think this should be an error and we should raise an exception. Maybe a ValueError
exception could be raised because lines
is neither a bytes
or a str
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay. I've replaced the return empty string with raise ValueError('Lines must be either bytes or str')
I had to add changes corresponding to |
Unfortunately the combination of |
I apologize, I will keep your recommendation in mind in future |
#433 Refactored the code to comply with Pylint's recommendation.