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 #1243

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

Solution #1243

wants to merge 1 commit into from

Conversation

Waldemar-wal
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 implementing the solution! 🎉 The code meets the task requirements and constraints effectively. While there are minor improvements suggested, such as refining the return message for clarity and ensuring the presence of the wearing_a_mask key to avoid potential errors, these do not impact the core 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! ✨

if visitor["vaccine"]["expiration_date"] < date.today():
raise OutdatedVaccineError("Vaccine is outdated.")

if visitor["wearing_a_mask"] is False:

Choose a reason for hiding this comment

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

Consider checking if the 'wearing_a_mask' key exists in the visitor dictionary before accessing it. This will prevent a potential KeyError if the key is missing.

except NotWearingMaskError:
masks_to_buy += 1
if masks_to_buy > 0:
return f"Friends should buy {masks_to_buy} masks"

Choose a reason for hiding this comment

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

Consider rephrasing the return message to 'Friends should buy masks' for better readability, especially when masks_to_buy is 1. Alternatively, handle singular and plural cases separately.

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