Skip to content

Commit ff86f52

Browse files
committed
Post final QA
1 parent 9b0811d commit ff86f52

File tree

8 files changed

+11
-12
lines changed

8 files changed

+11
-12
lines changed

python-docstrings/get_potter_books.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
from multi_line_docstring import get_harry_potter_books
1+
from multiline_docstring import get_harry_potter_books
22

33
print(get_harry_potter_books.__doc__)

python-docstrings/google_style.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ def get_magic_items(user_id, include_potions=False):
44
55
Args:
66
user_id (int): The ID of the user whose items should be retrieved.
7-
include_potions (bool, optional): Whether to include potions in the result.
7+
include_potions (bool, optional): Whether to include potions.
88
99
Returns:
1010
list[str]: A list of item names associated with the user.

python-docstrings/magic_spells.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
def undo_spell(spell):
22
"""
3-
Reverses characters in a spell incantation thereby undoing a spell.
3+
Reverses characters in a spell incantation, thereby undoing a spell.
44
55
Example:
66
>>> undo_spell("Expelliarmus")
7-
"sumraillepxE"
7+
'sumraillepxE'
88
99
>>> undo_spell("Lumos")
10-
"somuL"
10+
'somuL'
1111
"""
1212
return spell[::-1]

python-docstrings/magical_characters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""A magical module for adding and listing magical characters."""
1+
"""A module for adding and listing magical characters."""
22

33

44
def add_characters(magical_being):
Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
1-
def get_harry_potter_books(publication_year, book_name):
1+
def get_harry_potter_book(publication_year, title):
22
"""
33
Retrieve a Harry Potter book by its publication year and name.
44
55
Parameters:
66
publication_year (int): The year the book was published.
7-
book_name (str): The name of the book.
7+
title (str): The title of the book.
88
99
Returns:
1010
str: A sentence describing the book and its publication year.
1111
"""
12-
return (
13-
f"The book {book_name} was published in the year {publication_year}."
14-
)
12+
return f"The book {title!r} was published in the year {publication_year}."

python-docstrings/navigation.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
"""
22
This module provides tools for creating and managing magical maps.
3+
34
Example:
45
from navigation import build_map
56
build_map(["mandrake", "phoenix feather", "tree bark"], heat_level=3)

python-docstrings/one_line_docstring.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33

44
def picking_hat():
5-
"""Returns a random house name."""
5+
"""Return a random house name."""
66
houses = ["Gryffindor", "Hufflepuff", "Ravenclaw", "Slytherin"]
77
return random.choice(houses)

0 commit comments

Comments
 (0)