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
Use absolute imports #50
Conversation
...oops. Looks like the CI build failed only because a reduces score by pylint, am I getting that right? May that be caused by new version of pylint or something? |
Looks like it is a pylint error on the print statement. I am unsure why that is coming up (probably in pylint docs), but the print statement shouldn't be there at all anyway. I am not sure why coveralls is complaining since it should be aggregating coverage counts over python 2 and 3. |
@@ -44,6 +44,7 @@ def __init__(self, sequence, transform=None): | |||
self._base_sequence = sequence._unwrap_sequence() | |||
self._lineage = Lineage(prior_lineage=sequence._lineage) | |||
elif isinstance(sequence, list) or isinstance(sequence, tuple) or is_iterable(sequence): | |||
print(type(sequence)) |
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.
Print statement shouldn't be here
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.
Oh, my bad, somehow I completely missed that when checking the diff. Will correct in ~10 hours.
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.
Thanks, looks good otherwise if Travis and Coveralls agree
I have seen python packages go both ways, what is the biggest reason to go for absolute imports over relative? I think I saw relative imports in some of the python scientific libraries, although their the use case is to be able to move code around easily since its a very large project (not the case with this) |
On coveralls I bet its that the test did not pass so it didn't include coverage results from failed tests (the python 2 ones due to pylint on print) |
It's the recommended style in PEP8:
|
Didn't notice the commit until now. Looks good to me. |
Uses more explicit absolute imports and imports
absolute_import
for extra safety.AFAIK should perfectly build on both Py2 and 3. I checked them on my OS, but let's see what CI has to say too.