Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
I am requesting changes because a core requirement regarding method return types has not been met. Your project's logic is correct, but the task specifies that methods should not return any values. The correct type hint for a function that doesn't return anything is -> None, but your methods are consistently hinted as -> str.
Please correct the return type hints in sell_product, movie_session, watch_movie, and clean_hall across their respective files. This is an important concept for writing clear and accurate code.
Additionally, a good practice to adopt is to avoid modifying input parameters, as seen in app/main.py. Creating a new list of Customer objects would be a better approach than altering the original list. After you fix the type hints, your submission will be ready!
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
Important
Fix the issues, commit the changes, and then re-request my review using the Re-request review button2 in the Reviewers tab.
Tip
If you have any comments about this review, please leave a message in the Add a comment section below and mention me with the @mateacademy-ai-mentor tag3.
I will read your message during my next review of your pull request. Please do not reply directly to my comments, as that feature is not supported yet.
Caution
Do not close the pull request until the review is complete. Closing it early can lead to unexpected behavior and disrupt the review process.
Footnotes
app/cinema/bar.py
Outdated
| @@ -0,0 +1,4 @@ | |||
| class CinemaBar: | |||
| @staticmethod | |||
| def sell_product(product: str, customer: object) -> str: | |||
There was a problem hiding this comment.
The task description states that methods should not return any value. The correct return type hint for a function that doesn't return anything is None, not str.
app/main.py
Outdated
| ) -> None: | ||
| customer_list = [] | ||
| for customer in customers: | ||
| customer["instance"] = Customer(customer["name"], customer["food"]) |
There was a problem hiding this comment.
Modifying input parameters, like this customers list, is considered a bad practice because it creates side effects that can be hard to track. It's better to create a new list of Customer objects without altering the original list of dictionaries.
app/main.py
Outdated
| for customer in customers: | ||
| CinemaBar.sell_product(customer["instance"].food, customer["instance"]) |
There was a problem hiding this comment.
Since you have already collected all Customer instances in customer_list, it would be more direct and clear to iterate over customer_list here instead of iterating over the original customers list again.
app/people/cinema_staff.py
Outdated
| def __init__(self, name: str) -> None: | ||
| self.name = name | ||
|
|
||
| def clean_hall(self, hall_number: int) -> str: |
There was a problem hiding this comment.
The task requirements state that methods should only print messages and not return anything. The return type hint should be -> None to reflect that this method does not return a value.
app/cinema/hall.py
Outdated
| movie_name: str, | ||
| customers: list, | ||
| cleaning_staff: object | ||
| ) -> str: |
There was a problem hiding this comment.
The task description states that methods should only print messages and not return anything. This method correctly returns None implicitly, but the type hint -> str is incorrect. It should be -> None to match the actual behavior.
app/people/customer.py
Outdated
| self.name = name | ||
| self.food = food | ||
|
|
||
| def watch_movie(self, movie: str) -> str: |
There was a problem hiding this comment.
The task requirements state that methods should only print messages and not return anything. The return type hint here should be -> None to reflect that this method does not return a value.
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Excellent work on this submission! I am approving it because you've successfully addressed all the feedback from the previous review. The type hints are now correct across all files, and the overall logic perfectly matches the project requirements. Your code is clean, well-structured, and functions as expected. Keep up the great work!
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
No description provided.