-
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 pull request #572 from iKostanOrg/master #573
Conversation
Merge from master
Reviewer's Guide by SourceryThis pull request includes several updates and improvements to the test suites, enhancing their clarity, structure, and efficiency. Additionally, a new kata, "Closest elevator," has been added. Sequence diagram for the Closest Elevator logicsequenceDiagram
participant C as Caller
participant E as Elevator Function
participant L as Left Elevator
participant R as Right Elevator
C->>E: elevator(left, right, call)
E->>L: Check distance from left
E->>R: Check distance from right
alt both elevators at same distance
E->>R: Choose right elevator
else left closer
E->>L: Choose left elevator
else right closer
E->>R: Choose right elevator
end
E->>C: Return chosen elevator ('left' or 'right')
Class diagram for the new Closest Elevator kataclassDiagram
class elevator {
+elevator(left: int, right: int, call: int) str
}
note for elevator "New kata implementation for finding
the closest elevator between left and right"
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.
We have skipped reviewing this pull request. Here's why:
- We don't review packaging changes - Let us know if you'd like us to change this.
- All of the files are larger than we can process. We're working on it!
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #573 +/- ##
=======================================
Coverage 90.39% 90.39%
=======================================
Files 172 172
Lines 2550 2550
=======================================
Hits 2305 2305
Misses 245 245 ☔ View full report in Codecov by Sentry. |
Code Climate has analyzed commit f1d31ca and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 100.0% (50% is the threshold). This pull request will bring the total coverage in the repository to 90.3% (0.0% change). View more on Code Climate. |
Using config file /home/runner/work/codewars/codewars/.pylintrc ************* Module kyu_8.closest_elevator.closest_elevator kyu_8/closest_elevator/closest_elevator.py:24:0: C0305: Trailing newlines (trailing-newlines)
Issues to fix by upgrading dependencies: Upgrade [email protected] to [email protected] to fix ✗ Template Injection (new) [Medium Severity][https://security.snyk.io/vuln/SNYK-PYTHON-JINJA2-8548181] in [email protected] introduced by [email protected] and 2 other path(s) ✗ Improper Neutralization (new) [Medium Severity][https://security.snyk.io/vuln/SNYK-PYTHON-JINJA2-8548987] in [email protected] introduced by [email protected] and 2 other path(s)
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 ...".
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 ...".
@sourcery-ai review |
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: 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.
Merge from master
Summary by Sourcery
Add "Closest elevator" kata, tests and documentation.
New Features:
Tests: