Skip to content

Group 5 - Refactoring library class#18

Open
PtrBld wants to merge 1 commit intomainfrom
group5
Open

Group 5 - Refactoring library class#18
PtrBld wants to merge 1 commit intomainfrom
group5

Conversation

@PtrBld
Copy link
Contributor

@PtrBld PtrBld commented Nov 13, 2023

No description provided.

return str(max)

# Constructor
def __init__(self, books: list[Book]):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could have specified __init__ near class initialisation

max = b
# end if
# end if
else:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

else with pass confuses for no reason

Copy link

@dejavu9127 dejavu9127 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please resolve asap

def __init__(self, books: list[Book]):
self._books = books

_books: list[Book] = []

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Declare _books when initialising

print("********* Longest Crime Audio Book **********")
print("*********************************************")

for b in self.get_books():

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_audio_books=[b for b in self.get_books() if (b._book_type == "Audio") and (Genre.CRIME in b.genres)]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants