-
Notifications
You must be signed in to change notification settings - Fork 735
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 #674
base: master
Are you sure you want to change the base?
Solution #674
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.
Great job on your submission! 🎉 The code meets the core requirements and functions as expected. While there are a few minor improvements suggested, such as ensuring consistent use of quotes, correcting the import statement, and revising the __getitem__
method, these do not impact the overall functionality. Keep up the good work and consider these suggestions for future enhancements! 😊
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
|
||
|
||
def attending_shop(customer: Customer, shop: Shop) -> None: | ||
date_of_shopping = datetime(2021, 1, 4, 12, 33, 41) |
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 date is hardcoded to a specific value. Consider using datetime.now()
to get the current date and time dynamically.
|
||
def create_account(customer: dict) -> Customer: | ||
client = Customer(**customer) | ||
client.car = Car(client.car["brand"], client.car["fuel_consumption"]) |
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.
Ensure that the keys in client.car
dictionary match the parameters expected by the Car
constructor. The keys should be brand
and fuel_consumption
as per the Car
class definition.
def __getitem__(self) -> str | float: | ||
return self |
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 __getitem__
method is typically used to allow object indexing. Returning self
is unusual and might not be the intended behavior. Consider revising this method to return specific attributes if needed.
No description provided.