Skip to content

Commit

Permalink
Update hashtag_generator.py
Browse files Browse the repository at this point in the history
looking for now-outdated files... /home/docs/checkouts/readthedocs.org/user_builds/codewars/checkouts/555/kyu_5/the_hashtag_generator/hashtag_generator.py:docstring of kyu_5.the_hashtag_generator.hashtag_generator.generate_hashtag:6: WARNING: Enumerated list ends without a blank line; unexpected unindent. [docutils]
  • Loading branch information
ikostan committed Dec 13, 2024
1 parent 322ed6a commit 9914dca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kyu_5/the_hashtag_generator/hashtag_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ def generate_hashtag(word: str) -> bool | str:
2. All words must have their first letter capitalized.
3. If the final result is longer than 140 chars it must return false.
4. If the input or the result is an empty string it must return false.
:param word: str
:return:
"""
Expand All @@ -23,5 +24,4 @@ def generate_hashtag(word: str) -> bool | str:
result: str = ''.join(string.capitalize() for string in word.split(' ')
if string.strip() != '')
result = '#' + result

return False if len(result) > 140 else result

0 comments on commit 9914dca

Please sign in to comment.