-
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 #575
Merge from master #575
Conversation
Merge pull request #568 from iKostanOrg/master
Merge from master
kyu_8/make_upper_case/make_upper_case.py:10 in public function `make_upper_case`: D401: First line should be in imperative mood; try rephrasing (found 'Function') [Docstring] prescribes the function or method's effect as a command: ("Do this", "Return that"), not as a description; e.g. don't write "Returns the pathname ...".
kyu_8/will_there_be_enough_space/enough.py:10 in public function `enough`: D401: First line should be in imperative mood; try rephrasing (found 'The') [Docstring] prescribes the function or method's effect as a command: ("Do this", "Return that"), not as a description; e.g. don't write "Returns the pathname ...".
kyu_8/keep_up_the_hoop/hoop_count.py:1 at module level: D205: 1 blank line required between summary line and description (found 0) Multi-line docstrings consist of a summary line just like a one-line docstring, followed by a blank line, followed by a more elaborate description. The summary line may be used by automatic indexing tools; it is important that it fits on one line and is separated from the rest of the docstring by a blank line. kyu_8/keep_up_the_hoop/hoop_count.py:1 at module level: D400: First line should end with a period (not 'p') The [first line of a] docstring is a phrase ending in a period. kyu_8/keep_up_the_hoop/hoop_count.py:9 in public function `hoop_count`: D205: 1 blank line required between summary line and description (found 0) Multi-line docstrings consist of a summary line just like a one-line docstring, followed by a blank line, followed by a more elaborate description. The summary line may be used by automatic indexing tools; it is important that it fits on one line and is separated from the rest of the docstring by a blank line. kyu_8/keep_up_the_hoop/hoop_count.py:9 in public function `hoop_count`: D400: First line should end with a period (not 'e') The [first line of a] docstring is a phrase ending in a period. kyu_8/keep_up_the_hoop/hoop_count.py:9 in public function `hoop_count`: D401: First line should be in imperative mood; try rephrasing (found 'A') [Docstring] prescribes the function or method's effect as a command: ("Do this", "Return that"), not as a description; e.g. don't write "Returns the pathname ...". kyu_8/keep_up_the_hoop/__init__.py:1 at module level: D104: Missing docstring in public package All modules should normally have docstrings. [...] all functions and classes exported by a module should also have docstrings. Public methods (including the __init__ constructor) should also have docstrings. Note: Public (exported) definitions are either those with names listed in __all__ variable (if present), or those that do not start with a single underscore. kyu_8/keep_up_the_hoop/test_hoop_count.py:1 at module level: D205: 1 blank line required between summary line and description (found 0) Multi-line docstrings consist of a summary line just like a one-line docstring, followed by a blank line, followed by a more elaborate description. The summary line may be used by automatic indexing tools; it is important that it fits on one line and is separated from the rest of the docstring by a blank line. kyu_8/keep_up_the_hoop/test_hoop_count.py:1 at module level: D400: First line should end with a period (not 'p') The [first line of a] docstring is a phrase ending in a period. kyu_8/keep_up_the_hoop/test_hoop_count.py:28 in public class `HoopCountTestCase`: D200: One-line docstring should fit on one line with quotes (found 3) The closing quotes are on the same line as the opening quotes. This looks better for one-liners. kyu_8/keep_up_the_hoop/test_hoop_count.py:28 in public class `HoopCountTestCase`: D400: First line should end with a period (not 'n') The [first line of a] docstring is a phrase ending in a period. kyu_8/keep_up_the_hoop/test_hoop_count.py:33 in public method `test_hoop_count_positive`: D400: First line should end with a period (not ')') The [first line of a] docstring is a phrase ending in a period. kyu_8/keep_up_the_hoop/test_hoop_count.py:66 in public method `test_hoop_count_negative`: D205: 1 blank line required between summary line and description (found 0) Multi-line docstrings consist of a summary line just like a one-line docstring, followed by a blank line, followed by a more elaborate description. The summary line may be used by automatic indexing tools; it is important that it fits on one line and is separated from the rest of the docstring by a blank line. kyu_8/keep_up_the_hoop/test_hoop_count.py:66 in public method `test_hoop_count_negative`: D400: First line should end with a period (not ')') The [first line of a] docstring is a phrase ending in a period.
kyu_8/logical_calculator/test_logical_calculator.py:1 at module level: D205: 1 blank line required between summary line and description (found 0) Multi-line docstrings consist of a summary line just like a one-line docstring, followed by a blank line, followed by a more elaborate description. The summary line may be used by automatic indexing tools; it is important that it fits on one line and is separated from the rest of the docstring by a blank line. kyu_8/logical_calculator/test_logical_calculator.py:1 at module level: D400: First line should end with a period (not 'r') The [first line of a] docstring is a phrase ending in a period. kyu_8/logical_calculator/test_logical_calculator.py:30 in public class `LogicalCalculatorTestCase`: D200: One-line docstring should fit on one line with quotes (found 3) The closing quotes are on the same line as the opening quotes. This looks better for one-liners. kyu_8/logical_calculator/test_logical_calculator.py:30 in public class `LogicalCalculatorTestCase`: D400: First line should end with a period (not 'n') The [first line of a] docstring is a phrase ending in a period. kyu_8/logical_calculator/test_logical_calculator.py:35 in public method `test_logical_calc_and`: D205: 1 blank line required between summary line and description (found 0) Multi-line docstrings consist of a summary line just like a one-line docstring, followed by a blank line, followed by a more elaborate description. The summary line may be used by automatic indexing tools; it is important that it fits on one line and is separated from the rest of the docstring by a blank line. kyu_8/logical_calculator/test_logical_calculator.py:35 in public method `test_logical_calc_and`: D400: First line should end with a period (not 'l') The [first line of a] docstring is a phrase ending in a period. kyu_8/logical_calculator/test_logical_calculator.py:99 in public method `test_logical_calc_or`: D205: 1 blank line required between summary line and description (found 0) Multi-line docstrings consist of a summary line just like a one-line docstring, followed by a blank line, followed by a more elaborate description. The summary line may be used by automatic indexing tools; it is important that it fits on one line and is separated from the rest of the docstring by a blank line. kyu_8/logical_calculator/test_logical_calculator.py:99 in public method `test_logical_calc_or`: D400: First line should end with a period (not 'e') The [first line of a] docstring is a phrase ending in a period. kyu_8/logical_calculator/test_logical_calculator.py:157 in public method `test_logical_calc_xor`: D205: 1 blank line required between summary line and description (found 0) Multi-line docstrings consist of a summary line just like a one-line docstring, followed by a blank line, followed by a more elaborate description. The summary line may be used by automatic indexing tools; it is important that it fits on one line and is separated from the rest of the docstring by a blank line. kyu_8/logical_calculator/test_logical_calculator.py:157 in public method `test_logical_calc_xor`: D400: First line should end with a period (not 'a') The [first line of a] docstring is a phrase ending in a period. kyu_8/logical_calculator/__init__.py:1 at module level: D104: Missing docstring in public package All modules should normally have docstrings. [...] all functions and classes exported by a module should also have docstrings. Public methods (including the __init__ constructor) should also have docstrings. Note: Public (exported) definitions are either those with names listed in __all__ variable (if present), or those that do not start with a single underscore. kyu_8/logical_calculator/logical_calculator.py:1 at module level: D205: 1 blank line required between summary line and description (found 0) Multi-line docstrings consist of a summary line just like a one-line docstring, followed by a blank line, followed by a more elaborate description. The summary line may be used by automatic indexing tools; it is important that it fits on one line and is separated from the rest of the docstring by a blank line. kyu_8/logical_calculator/logical_calculator.py:1 at module level: D400: First line should end with a period (not 'r') The [first line of a] docstring is a phrase ending in a period. kyu_8/logical_calculator/logical_calculator.py:9 in public function `logical_calc`: D401: First line should be in imperative mood (perhaps 'Calculate', not 'Calculates') [Docstring] prescribes the function or method's effect as a command: ("Do this", "Return that"), not as a description; e.g. don't write "Returns the pathname ...".
kyu_8/is_your_period_late/__init__.py:1 at module level: D104: Missing docstring in public package All modules should normally have docstrings. [...] all functions and classes exported by a module should also have docstrings. Public methods (including the __init__ constructor) should also have docstrings. Note: Public (exported) definitions are either those with names listed in __all__ variable (if present), or those that do not start with a single underscore. kyu_8/is_your_period_late/test_is_your_period_late.py:1 at module level: D205: 1 blank line required between summary line and description (found 0) Multi-line docstrings consist of a summary line just like a one-line docstring, followed by a blank line, followed by a more elaborate description. The summary line may be used by automatic indexing tools; it is important that it fits on one line and is separated from the rest of the docstring by a blank line. kyu_8/is_your_period_late/test_is_your_period_late.py:1 at module level: D400: First line should end with a period (not 'e') The [first line of a] docstring is a phrase ending in a period. kyu_8/is_your_period_late/test_is_your_period_late.py:30 in public class `PeriodIsLateTestCase`: D200: One-line docstring should fit on one line with quotes (found 3) The closing quotes are on the same line as the opening quotes. This looks better for one-liners. kyu_8/is_your_period_late/test_is_your_period_late.py:30 in public class `PeriodIsLateTestCase`: D400: First line should end with a period (not 'n') The [first line of a] docstring is a phrase ending in a period. kyu_8/is_your_period_late/test_is_your_period_late.py:35 in public method `test_period_is_late_positive`: D205: 1 blank line required between summary line and description (found 0) Multi-line docstrings consist of a summary line just like a one-line docstring, followed by a blank line, followed by a more elaborate description. The summary line may be used by automatic indexing tools; it is important that it fits on one line and is separated from the rest of the docstring by a blank line. kyu_8/is_your_period_late/test_is_your_period_late.py:35 in public method `test_period_is_late_positive`: D400: First line should end with a period (not 's') The [first line of a] docstring is a phrase ending in a period. kyu_8/is_your_period_late/test_is_your_period_late.py:98 in public method `test_period_is_late_negative`: D205: 1 blank line required between summary line and description (found 0) Multi-line docstrings consist of a summary line just like a one-line docstring, followed by a blank line, followed by a more elaborate description. The summary line may be used by automatic indexing tools; it is important that it fits on one line and is separated from the rest of the docstring by a blank line. kyu_8/is_your_period_late/test_is_your_period_late.py:98 in public method `test_period_is_late_negative`: D400: First line should end with a period (not 's') The [first line of a] docstring is a phrase ending in a period. kyu_8/is_your_period_late/is_your_period_late.py:1 at module level: D205: 1 blank line required between summary line and description (found 0) Multi-line docstrings consist of a summary line just like a one-line docstring, followed by a blank line, followed by a more elaborate description. The summary line may be used by automatic indexing tools; it is important that it fits on one line and is separated from the rest of the docstring by a blank line. kyu_8/is_your_period_late/is_your_period_late.py:1 at module level: D400: First line should end with a period (not 'e') The [first line of a] docstring is a phrase ending in a period.
kyu_8/set_alarm/test_set_alarm.py:31 in public class `SetAlarmTestCase`: D200: One-line docstring should fit on one line with quotes (found 3) The closing quotes are on the same line as the opening quotes. This looks better for one-liners. kyu_8/set_alarm/test_set_alarm.py:31 in public class `SetAlarmTestCase`: D400: First line should end with a period (not 'n') The [first line of a] docstring is a phrase ending in a period. kyu_8/set_alarm/test_set_alarm.py:49 in public method `test_set_alarm`: D412: No blank lines allowed between a section header and its content ('Examples')
kyu_8/set_alarm/test_set_alarm.py:47 in public method `test_set_alarm`: D412: No blank lines allowed between a section header and its content ('Examples')
kyu_8/logical_calculator/logical_calculator.py:10 in public function `logical_calc`: D401: First line should be in imperative mood (perhaps 'Calculate', not 'Calculates') [Docstring] prescribes the function or method's effect as a command: ("Do this", "Return that"), not as a description; e.g. don't write "Returns the pathname ...".
kyu_8/check_the_exam/check_exam.py:37 in public function `char_processor`: D401: First line should be in imperative mood (perhaps 'Process', not 'Processing') [Docstring] prescribes the function or method's effect as a command: ("Do this", "Return that"), not as a description; e.g. don't write "Returns the pathname ...".
kyu_8/well_of_ideas_easy_version/well_of_ideas_easy_version.py:12 in public function `well`: D400: First line should end with a period (not 'n') The [first line of a] docstring is a phrase ending in a period.
kyu_8/greek_sort/evaluator.py:10 in public function `evaluator`: D401: First line should be in imperative mood (perhaps 'Evaluate', not 'evaluator') [Docstring] prescribes the function or method's effect as a command: ("Do this", "Return that"), not as a description; e.g. don't write "Returns the pathname ...".
Merge pull request #572 from iKostanOrg/master
./kyu_8/closest_elevator/closest_elevator.py:8:1: E302 expected 2 blank lines, found 1 def elevator(left: int, right: int, call: int) -> str:
./kyu_8/enumerable_magic_25/test_take.py:65:27: E127 continuation line over-indented for visual indent n=n, ^ ./kyu_8/enumerable_magic_25/test_take.py:66:27: E127 continuation line over-indented for visual indent expected=expected, ^ ./kyu_8/enumerable_magic_25/test_take.py:67:27: E127 continuation line over-indented for visual indent result=actual_result)
Error: kyu_8/closest_elevator/README.md:21 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"] https://github.com/DavidAnson/markdownlint/blob/v0.36.1/doc/md040.md
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 introduces several improvements to the test suites, enhancing their readability, structure, and efficiency. It also adds a new kata and updates the README file. Class diagram showing the new elevator kata structureclassDiagram
class elevator {
+elevator(left: int, right: int, call: int) str
}
note for elevator "New kata added for finding closest elevator"
State diagram showing elevator decision logicstateDiagram-v2
[*] --> CheckElevators
CheckElevators --> BothEqual: left == right == call
CheckElevators --> CompareDistance: left != right or call != left/right
BothEqual --> ReturnRight: Always choose right
CompareDistance --> ReturnLeft: left == call OR abs(call-left) < abs(call-right)
CompareDistance --> ReturnRight: Otherwise
ReturnLeft --> [*]
ReturnRight --> [*]
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: all looks good
- 🟢 Security: all looks good
- 🟡 Testing: 1 issue found
- 🟢 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.
count_sheeps(lst), | ||
count_sheep(lst), | ||
f"There are 17 sheep in total, " | ||
f"not {count_sheeps(lst)}") |
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 (testing): Typo in function name.
The function name in the tests is count_sheeps
, but the actual function name in the code is count_sheep
. Please correct the typo in the tests.
Merge pull request #575 from iKostanOrg/master
Summary by Sourcery
Update documentation and tests for several 8 kyu katas.
Documentation:
Tests: