-
Notifications
You must be signed in to change notification settings - Fork 6
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
Merge from master #591
Merge from master #591
Conversation
Merge pull request #587 from iKostanOrg/master
/.github/workflows/codecov.yml Error: 39:7 [comments-indentation] comment not indented like content Warning: 43:81 [line-length] line too long (127 > 80 characters)
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
merge from master
./kyu_8/counting_sheep/test_counting_sheep.py:67:25: E128 continuation line under-indented for visual indent f"There are 17 sheep in total, not {count_sheep(lst)}") ^ ./kyu_8/counting_sheep/test_counting_sheep.py:95:25: E128 continuation line under-indented for visual indent f"There are 0 sheep in total, not {count_sheep(lst)}") ^ ./kyu_8/counting_sheep/test_counting_sheep.py:124:25: E128 continuation line under-indented for visual indent f"There are 0 sheep in total, not {count_sheep(lst)}") ^ ./kyu_8/counting_sheep/test_counting_sheep.py:153:25: E128 continuation line under-indented for visual indent f"There are 0 sheep in total, not {count_sheep(lst)}") ^ 4 E128 continuation line under-indented for visual indent
Explanation:¶ This is a quick way to streamline code slightly. Where a value is set on each branch of an if and then immediately returned, instead return it directly from each branch. This has removed an unnecessary intermediate variable which we had to mentally track.
kyu_8/dalmatians_101_squash_bugs/solution.py:21:4: R1705: Unnecessary "elif" after "return", remove the leading "el" from "elif" (no-else-return)
Merge from master
This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation. |
Reviewer's Guide by SourceryThis pull request implements a new kata, "101 Dalmatians - squash the bugs, not the dogs!", and updates the project's documentation and dependencies. Sequence diagram for how_many_dalmatians function flowsequenceDiagram
participant C as Caller
participant F as how_many_dalmatians
C->>F: number: int
alt number <= 10
F-->>C: "Hardly any"
else number <= 50
F-->>C: "More than a handful!"
else number == 101
F-->>C: "101 DALMATIONS!!!"
else default
F-->>C: "Woah that's a lot of dogs!"
end
Class diagram for the new 101 Dalmatians kata solutionclassDiagram
class how_many_dalmatians {
+how_many_dalmatians(number: int) str
}
note for how_many_dalmatians "New function that returns a response based on number of dogs"
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Hey @ikostan - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
@@ -251,10 +250,10 @@ Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression | |||
Install from [Scoop](https://scoop.sh/#/): | |||
|
|||
1. Make sure Scoop is installed. See [the installation instructions on GitHub](https://github.com/ScoopInstaller/Install#readme). | |||
2. Make sure `Java version 8 or above` installed, and its directory is specified | |||
2. Make sure `Java version 8 or higher` installed, and its directory is specified |
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.
issue (typo): Typo: Missing period.
There should be a period at the end of the sentence: "Make sure Java version 8 or higher
installed, and its directory is specified."
2. Make sure `Java version 8 or higher` installed, and its directory is specified | |
2. Make sure `Java version 8 or higher` installed, and its directory is specified. |
if number == 101: | ||
return dogs[3] | ||
|
||
return dogs[2] |
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.
suggestion (code-quality): We've found these issues:
- Lift code into else after jump in control flow (
reintroduce-else
) - Replace if statement with if expression (
assign-if-exp
)
if number == 101: | |
return dogs[3] | |
return dogs[2] | |
return dogs[3] if number == 101 else dogs[2] |
Merge pull request #591 from iKostanOrg/master
Summary by Sourcery
Add solution and tests for "101 Dalmatians - squash the bugs, not the dogs!" kata.
New Features: