-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
py-cinema-visit program #1731
base: master
Are you sure you want to change the base?
py-cinema-visit program #1731
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.
Thank you for your hard work on this project! 😊 There are a couple of critical issues that need to be addressed before we can approve the pull request. The sell_product
method in the CinemaBar
class and the cinema_visit
function in main.py
both have incorrect type hints for their parameters. The customer
parameter should be an instance of the Customer
class, and the cleaner
parameter should be an instance of the Cleaner
class. These changes are necessary to ensure the methods work as intended. Once these are fixed, your solution will be ready for approval. Keep up the great work! 🚀
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
🔄 Fix the issues, commit the changes, and then re-request my review using the Re-request review
button in the Reviewers tab.
app/cinema/bar.py
Outdated
@@ -0,0 +1,4 @@ | |||
class CinemaBar: | |||
@staticmethod | |||
def sell_product(product: str, customer: str) -> 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 customer
parameter is expected to be an instance of the Customer
class, not a str
. Change the type hint from str
to Customer
to match the expected input and allow access to the name
attribute.
app/main.py
Outdated
pass | ||
def cinema_visit(customers: list, | ||
hall_number: int, | ||
cleaner: 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 cleaner
parameter is expected to be a Cleaner
instance, not a str
. Change the type hint from str
to Cleaner
to match the expected input and allow proper interaction with the Cleaner
class.
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 addressing the type hint issues in the CinemaBar
and CinemaHall
classes, as well as in the cinema_visit
function! 🎉 Your implementation now aligns with the task requirements, and all classes and methods are functioning as expected.
Key Points:
- CinemaBar Class: The
sell_product
method now correctly uses theCustomer
class for type hinting. - CinemaHall Class: The
movie_session
method has been updated to use theCleaner
class for thecleaning_staff
parameter. - Customer and Cleaner Classes: Both classes are implemented correctly, with methods that print the expected messages.
- Main Module: The
cinema_visit
function correctly imports classes and performs operations in the correct order.
Your code is correct and complete, meeting all task requirements. While there are no critical issues, always ensure to review type hints and class implementations to maintain code quality. Keep up the great work, and continue learning from each task! 🚀
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
No description provided.