Skip to content

Commit

Permalink
keep_up_the_hoop
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ikostan committed Dec 24, 2024
1 parent f32c8cd commit aced1db
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 13 deletions.
1 change: 1 addition & 0 deletions kyu_8/keep_up_the_hoop/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""Keep up the hoop."""
8 changes: 5 additions & 3 deletions kyu_8/keep_up_the_hoop/hoop_count.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
"""
Solution -> Keep up the hoop
Solution -> Keep up the hoop.
Created by Egor Kostan.
GitHub: https://github.com/ikostan
"""


def hoop_count(n: int) -> str:
"""
A program where Alex can input (n) how many times the
hoop goes round and it will return him an encouraging message
'hoop_count' function.
A program where Alex can input (n) how many times the
hoop goes round, and it will return him an encouraging message
:param n: int
:return: str
"""
Expand Down
19 changes: 9 additions & 10 deletions kyu_8/keep_up_the_hoop/test_hoop_count.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""
Test -> Keep up the hoop
Test -> Keep up the hoop.
Created by Egor Kostan.
GitHub: https://github.com/ikostan
"""
Expand All @@ -25,22 +26,19 @@
name='Source/Kata')
# pylint: enable=R0801
class HoopCountTestCase(unittest.TestCase):
"""
Testing hoop_count function
"""
"""Testing hoop_count function."""

def test_hoop_count_positive(self):
"""
Testing hoop_count function (positive)
Testing hoop_count function (positive).
Alex just got a new hula hoop, he loves it but feels
Alex just got a new hula-hoop, he loves it but feels
discouraged because his little brother is better than him
Write a program where Alex can input (n) how many times
the hoop goes round and it will return him an encouraging message
- 10 or more hoops, return "Great, now move on to tricks".
- Not 10 hoops, return "Keep at it until you get it".
:return:
Expand All @@ -54,7 +52,7 @@ def test_hoop_count_positive(self):
'<img src="https://www.codewars.com/users/myFirstCode'
'/badges/large">'
'<h3>Test Description:</h3>'
"<p></p>")
"<p>Testing hoop_count function (positive).</p>")
# pylint: enable=R0801
with allure.step("Enter n and verify the result"):
n: int = 11
Expand All @@ -64,7 +62,8 @@ def test_hoop_count_positive(self):

def test_hoop_count_negative(self):
"""
Testing hoop_count function (negative)
Testing hoop_count function (negative).
:return:
"""
# pylint: disable=R0801
Expand All @@ -76,7 +75,7 @@ def test_hoop_count_negative(self):
'<img src="https://www.codewars.com/users/myFirstCode'
'/badges/large">'
'<h3>Test Description:</h3>'
"<p></p>")
"<p>Testing hoop_count function (negative).</p>")
# pylint: enable=R0801
with allure.step("Enter n and verify the result"):
n: int = 3
Expand Down

0 comments on commit aced1db

Please sign in to comment.