-
Notifications
You must be signed in to change notification settings - Fork 0
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
challenge: subtract_two_numbers_challenge #52
Conversation
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.
I believe You could have done it with one branch but sometimes it is easier to create a new one and start from clear page, I know , hehe , It looks awesome and clear.
One more thing I'd like to mention: Gennadii suggested committing more frequently during development, and I think it's a great idea. This approach can really help with tracking progress and reviewing changes step by step.
But your challenge looks good, Approved
Files
- The file name describes the function's behavior
- There is a module docstring in the function file
- The test file's name matches the function file name -
/tests/test_file_name.py
- There is a module docstring in the tests file
Unit Tests
- The test class has a helpful name in PascalCase
- The test class has a docstring
- Every unit test has:
- A helpful name
- A clear docstring
- Only one assertion
- There is no logic in the unit test
- All tests pass
- There are tests for defensive assertions
- Comment: You have defensive assertions to handle non-numeric inputs correctly.
- There are tests for boundary cases
- Comment: Boundary cases like large numbers and zero are well-tested.
Function Docstring
- The function's behavior is described
- The function's arguments are described:
- Type
- Purpose
- The return value is described:
- Type
- The defensive assertions are documented using
Raises:
- Comment: Consider specifying the exact error raised (e.g.,
TypeError
) in the docstring.
- Comment: Consider specifying the exact error raised (e.g.,
- Include 3 or more (passing!) doctests
- Comment: Great job including multiple doctests that validate expected behavior.
The Function
- The function's name describes its behavior
- The function's name matches the file name
- The function has correct type annotations
- The function is not called at the top level of the function file
Strategy
Do's
- Variable names help to understand the strategy
- Any comments are clear and describe the strategy
- Lines of code are spaced to help show different stages of the strategy
Implementation
- The code passes the formatting checks
- The code passes all Ruff linting checks
- The code has no (reasonable) Pylint errors
- Variables are named with snake_case
- Comment: Variable names are consistent with PEP 8.
- The code follows the strategy as simply as possible
- There are no commented lines of code
- There are no
print
statements anywhere - The code includes defensive assertions
- Comment: Defensive checks for argument types are appropriate.
- Defensive assertions include as little logic as possible
name: solution review
about: A template PR for code review with a checklist
Behavior
Files
/tests/test_file_name.py
Unit Tests
Function Docstring
Raises:
The Function
Strategy
Do's
Don'ts
Implementation
when it's too restricting.
print
statements anywhere