Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
You've done an excellent job implementing the individual classes like CinemaBar, CinemaHall, Customer, and Cleaner. They all meet the requirements perfectly.
However, changes are needed because the main.py file is missing from your submission. This file is critical as it should contain the cinema_visit function, which orchestrates the entire simulation by creating instances of your classes and calling their methods.
Please add the main.py file and implement the cinema_visit function as described in the task instructions. Once that's in place, your project will be complete!
✨ 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
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Great work on implementing all the classes and the main simulation logic! Your code is very well-structured and correctly follows the requirements.
This requires a small change because there's a single linting error that's causing the automated checks to fail. In app/main.py, the cinema_visit function is missing its return type annotation.
To fix this, please add -> None to the function signature, since it doesn't return a value.
# In app/main.py
def cinema_visit(movie: str, customers: list, hall_number: int, cleaner: str) -> None:
# ... function implementationOnce you add this type hint, everything should pass. You're very close to finishing!
✨ 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
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
Great job implementing all the required classes—they are well-structured and meet the requirements perfectly! I am approving your solution as an educational override so you can move forward, but there are a few important issues in app/main.py that you should review and correct.
Your code is currently crashing due to an AttributeError. This is because you are accessing items from the customers list of dictionaries using attribute notation (e.g., customer.name) instead of key notation (e.g., customer['name']). Additionally, the cinema_hall.movie_session() method is called twice, which will cause the output to be duplicated. Finally, please reformat the cinema_visit function signature to place each parameter on a new line for readability, as outlined in [CHECKLIST ITEM #1].
Addressing these points will make your solution fully correct. Keep up the fantastic work!
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
Footnotes
| def cinema_visit(customers: list, hall_number: int, cleaner: str, movie: str)\ | ||
| -> None: |
There was a problem hiding this comment.
This violates checklist item #1: 'If the function definition line is too long, place each parameter on a new line.' Please format the function signature according to the example in the checklist for long function definitions.
| instances_customers_list = [Customer(customer.name, customer.food) | ||
| for customer in customers] |
There was a problem hiding this comment.
The customers parameter is a list of dictionaries, as stated in the task description. To access a customer's details, you'll need to use dictionary key access (e.g., customer['name']) rather than attribute access (customer.name).
| cinema_hall.movie_session(movie, | ||
| instances_customers_list, cleaner_instance) |
There was a problem hiding this comment.
The movie session is being called a second time here. The simulation should only run the session once per visit. Please remove this duplicate call.
verify task