-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 #1266
base: master
Are you sure you want to change the base?
Solution #1266
Conversation
app/cinema/hall.py
Outdated
cleaning_staff: cinema_staff.Cleaner) -> None: | ||
|
||
print(f'"{movie_name}" started in hall number {self.number}.') | ||
for someone in customers: |
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.
Bad variable name. Use the singular when iterating. For example: for car in cars
app/cinema/hall.py
Outdated
one = customer.Customer(someone.name, "") | ||
one.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.
Why create another one from an already created customer? This is already an instance of the Customer class, so you should use hist methods right away.
app/cinema/hall.py
Outdated
import app.people.customer as customer | ||
import app.people.cinema_staff as cinema_staff |
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.
It is better to import a whole class and use it without as
.
app/main.py
Outdated
cinema_hall = CinemaHall(hall_number) | ||
cinema_hall.movie_session(movie, all_customers, Cleaner(cleaner)) |
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.
You are not declaring a variable with Cleaner
instance, but at the same time you are doing this for cinema_hall. We can use this instance without a variable
app/cinema/hall.py
Outdated
def movie_session(self, | ||
movie_name: str, | ||
customers: list, | ||
cleaning_staff: app.people.cinema_staff.Cleaner) -> 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.
Pls, start all arguments from a new line if you have many of them(Check all funcs in your code), for example:
def movie_session(
self,
movie_name: 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.
gj!
No description provided.