-
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
Solution #1749
base: master
Are you sure you want to change the base?
Solution #1749
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.
Sorry, the pull request review was unsuccessful for the following reasons:
Warning
There are no files to review. Please make sure that you have added files to the pull request. Some files and directories may be ignored from the review or failed to load.
[CODE: 4]
Additional info:
Ignored files list:
app/cinema/__init__.py
app/cinema/bar.py
app/cinema/hall.py
app/people/__init__.py
app/people/cinema_staff.py
app/people/customer.py
If the issue is within your control, please address it.
The next review attempt will automatically launch in 1 hour.
If you believe this is an error or need assistance, please contact the support team.
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.
Hello! 😊 You've made great progress with your code, and it's clear that you've put a lot of effort into it. However, there are a few critical issues that need to be addressed before we can approve the pull request:
-
Incorrect Import Path for
Customer
: It seems like there's a misunderstanding with the import paths. TheCustomer
class should be imported from the correct module based on its definition. Please ensure that the import path reflects the actual file structure. -
Misuse of
watch_movie
Method: Thewatch_movie
method in theCustomer
class is being called with an argument, but it doesn't accept any parameters. Please adjust the method call to match its definition by removing the argument. -
Static Method Call in
CinemaBar
: Thesell_product
method is a static method, so there's no need to instantiate theCinemaBar
class to call it. You can directly call it using the class name.
Once these issues are resolved, your code will be in great shape! Keep up the good work, and feel free to reach out if you have any questions or need further assistance. You're almost there! 🚀
✨ 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
print(f"Customer {self.name} is watching a movie") | ||
|
||
|
||
cb = CinemaBar() |
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 CinemaBar
class is instantiated, but since sell_product
is a static method, you don't need to create an instance of CinemaBar
to call it. You can call it directly using CinemaBar.sell_product(customer=customer, product=customer.food)
.
) -> None: | ||
print(f'"{movie_name}" started in hall number {self.number}.') | ||
for customer in customers: | ||
customer.watch_movie(movie_name) |
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 watch_movie
method in the Customer
class does not accept any parameters, but here it is called with movie_name
as an argument. You should remove the argument to match the method definition: customer.watch_movie()
.
from app.cinema.bar import CinemaBar | ||
from app.cinema.hall import CinemaHall | ||
from app.people.cinema_staff import Cleaner | ||
from app.people.customer import Customer |
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 import path from app.people.customer import Customer
seems incorrect based on the current file structure. The Customer
class is defined in app/cinema/bar.py
, so you should import it from there: from app.cinema.bar import Customer
.
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.
Review Summary
Great job on implementing the classes and methods! 🎉 Your code is well-structured, and you've made significant progress. However, there are a few issues that need attention:
-
Incorrect Import Path for
Customer
: Ensure that theCustomer
class is correctly defined in thecustomer.py
file within theapp/people
package, and not in thebar.py
file. Thebar.py
file should only contain theCinemaBar
class. -
Misuse of
watch_movie
Method: Thewatch_movie
method in theCustomer
class is correctly defined to accept amovie
parameter. Ensure that it is used consistently across your codebase, particularly in theCinemaHall
class. -
Static Method Call in
CinemaBar
: You have correctly used thesell_product
method as a static method in thecinema_visit
function without creating an instance ofCinemaBar
. -
Unrelated Files: Remove any unrelated
Customer
class definitions from thebar.py
file to maintain clarity and organization.
These issues should be addressed to ensure your code meets the task requirements. The decision to approve is made to help you move forward with your learning. Please review the comments to improve your code. Remember, addressing these issues will enhance your coding skills and help avoid similar problems in the future. Keep up the good work and continue learning from your experiences! 🚀
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
for customer in customers: | ||
customer.watch_movie(movie_name) |
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 watch_movie
method is being called with an argument (movie_name
), but it does not accept any parameters. Remove the argument to match the method's definition.
def __str__(self) -> str: | ||
return self.name | ||
|
||
def watch_movie(self, movie: str) -> None: |
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 watch_movie
method currently accepts a movie
parameter. If the task requirements specify that this method should not take any parameters, you should remove the movie
parameter from the method definition.
No description provided.