Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upadded type hints and doctests to arithmetic_analysis/bisection.py #2241
Conversation
| if __name__ == "__main__": | ||
| print(bisection(f, 1, 1000)) |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
spamegg1
Jul 27, 2020
Author
Contributor
Hmm, I thought I was supposed to move all tests into the doctest. I guess I misunderstood. I can put it back in for sure.
| print("couldn't find root in [a,b]") | ||
| return | ||
| # then this algorithm can't find the root | ||
| print("couldn't find root in [", a, ",", b, "]") |
This comment has been minimized.
This comment has been minimized.
cclauss
Jul 27, 2020
Member
CONTRIBUTING.md says that algorithmic functions should not print. Please raise an exception instead of returning None.
This comment has been minimized.
This comment has been minimized.
Put back print statement at the end, replaced algorithm's print statement with an exception.
TravisBuddy
commented
Jul 27, 2020
|
Hey @spamegg1, TravisCI finished with status TravisBuddy Request Identifier: c68a55b0-d005-11ea-81e3-a59d363db46c |
Removed unnecessary type import "Optional"
| >>> bisection(lambda x: x ** 2 - 4 * x + 3, 4, 1000) | ||
| Traceback (most recent call last): | ||
| ... | ||
| Exception: could not find root in given interval. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
My first time ever going through this CI process, I apologize for the mistakes and my too many commits. Thank you for your patience. |
TravisBuddy
commented
Jul 27, 2020
Travis tests have failedHey @spamegg1, TravisBuddy Request Identifier: 1d5a89d0-d008-11ea-81e3-a59d363db46c |
|
Getting conflicting messages from Travis. It says tests failed, mentions a log but no link to it? And all checks have passed? I got the green check mark. Anyway, let me know what I should do. |
|
Awesome work! Thanks. |
|
Whew. That was quite stressful! I'll need a bit more practice with it. Thanks a lot, @cclauss |
May you explain please what was the issue ? |
spamegg1 commentedJul 27, 2020
continuing in line with #2128
Describe your change:
Checklist: