-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Solution #1308
base: master
Are you sure you want to change the base?
Solution #1308
Conversation
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.
Great job on implementing the Animal
, Cat
, and Dog
classes, as well as the feed_animals
function! 🎉 Your code meets the task requirements and constraints effectively. While there are minor issues with return types in some methods, they don't impact the core functionality. Keep up the good work, and consider refining the return types for better clarity in the future. 😊
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
self.appetite = appetite | ||
self.is_hungry = is_hungry | ||
|
||
def print_name(self) -> str: |
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.
The method print_name
is defined to return a str
, but it actually returns None
because it only prints the name. Consider changing the return type to None
or returning a string.
def print_name(self) -> str: | ||
print(f"Hello, I\'m {self.name}") | ||
|
||
def feed(self) -> str | int: |
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.
The method feed
is defined to return str | int
, but it only returns an int
. Consider updating the return type to int
unless you plan to return a string in some cases.
def __init__(self, name: str, is_hungry: bool = True) -> None: | ||
super().__init__(name, appetite=3, is_hungry=is_hungry) | ||
|
||
def catch_mouse(self) -> str: |
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.
The method catch_mouse
is defined to return a str
, but it actually returns None
because it only prints a message. Consider changing the return type to None
or returning a string.
def __init__(self, name: str, is_hungry: bool = True) -> None: | ||
super().__init__(name, appetite=7, is_hungry=is_hungry) | ||
|
||
def bring_slippers(self) -> str: |
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.
The method bring_slippers
is defined to return a str
, but it actually returns None
because it only prints a message. Consider changing the return type to None
or returning a string.
No description provided.