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

Solution #674

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

Solution #674

wants to merge 2 commits into from

Conversation

julia4406
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.

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)

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"])

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.

Comment on lines +15 to +16
def __getitem__(self) -> str | float:
return self

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.

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.

3 participants