Repository navigation
Implemented sqrt for cmath - #3047
Conversation
youknowone
left a comment
There was a problem hiding this comment.
Thank you for contributing! The added code looks great but I have a few comments.
- Please do not add
Cargo.lockchanges here. I have no idea why it is changed without anyCargo.tomlchanges but I think this is not what you intended. - Please run rustfmt.
cargo fmt --allis usually enough. - You may forgot to correctly set user.name and user.email. Search for
git config user.emailhow to do it and revise your commit metadata bygit commit --amend --reset-author
I don't believe we're currently at the point where we can confidently test your code just by running the CPython test suite (see these lines of |
|
@fanninpm In this case, I think we'd better to edit the test file to run actual test rather than adding our own test. The running is suppressed but there is already tests |
|
a tip for new open source contributors: never use |
|
Fixed up the tests a bit to allow |
Hi @DimitrisJim , I'm about to raise a PR for acos and acosh implementation, were these comments in the test file suggested by you to @Codemonk-adi ? Should I wait for his PR to be merged? |
Yup. Lets wait and see how we'll be running the tests. I'm personally open to either having a new variable or doing it as I've currently done. Since I'll try and follow most PRs for @youknowone opinions here? |
|
My suggestion is replcing line 331 like below: complex_fn = getattr(cmath, fn, None)
if complex_fn is None:
continueThen newly added function always will be tested but no error will be raised for not added one. |
|
Yup, that was a better idea. (Ref #3039 to keep track of the PRs.) |
DimitrisJim
left a comment
There was a problem hiding this comment.
Looks good to me, thanks!
Co-authored-by: Jim Fasarakis-Hilliard <d.f.hilliard@gmail.com>
|
@Codemonk-adi |
|
@youknowone |
|
@Codemonk-adi You should also set |
This is my first time working with rust, pls tell me if my code is wrong, i ran the test but couldnt unserstand the output