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

lockdown_cafe #1252

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

Biba007-pixel
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! 😊 While your implementation is mostly correct and aligns well with the task description, there are a few critical issues that need to be addressed before we can approve the pull request:

  1. Descriptive Error Messages: The visit_cafe method in the Cafe class should raise exceptions with descriptive messages. This is important for clarity and debugging purposes. Please ensure that each exception raised includes a descriptive message, as highlighted in the review comments.

  2. Use of try/except in go_to_cafe: The task requires using try/except blocks to handle exceptions in the go_to_cafe function. This is crucial for proper error handling and ensuring the function behaves as expected in different scenarios.

Once these issues are addressed, your code will be in great shape! Keep up the great work, and don't hesitate to reach out if you have any questions or need further assistance. 🚀

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


def visit_cafe(self, visitor: dict) -> str:
if "vaccine" not in visitor:
raise NotVaccinatedError()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider providing a descriptive message when raising the NotVaccinatedError to comply with the checklist requirement for descriptive error messages. Example: raise NotVaccinatedError('Visitor is not vaccinated.').


expiration_date = visitor["vaccine"]["expiration_date"]
if expiration_date < datetime.date.today():
raise OutdatedVaccineError()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider providing a descriptive message when raising the OutdatedVaccineError to comply with the checklist requirement for descriptive error messages. Example: raise OutdatedVaccineError('Visitor's vaccine is outdated.').

raise OutdatedVaccineError()

if not visitor.get("wearing_a_mask", False):
raise NotWearingMaskError()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider providing a descriptive message when raising the NotWearingMaskError to comply with the checklist requirement for descriptive error messages. Example: raise NotWearingMaskError('Visitor is not wearing a mask.').

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