Skip to content
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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

Grzechu700
Copy link

No description provided.

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a 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.

@@ -0,0 +1,4 @@
class CinemaBar:
@staticmethod
def sell_product(product: str, customer: str) -> str:

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,

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.

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a 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 the Customer class for type hinting.
  • CinemaHall Class: The movie_session method has been updated to use the Cleaner class for the cleaning_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! ✨

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.

2 participants