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

created system of determines visitors #618

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

Conversation

Mxbely
Copy link

@Mxbely Mxbely commented Oct 17, 2024

No description provided.

Copy link

@sumseer sumseer left a comment

Choose a reason for hiding this comment

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

Looks good!

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 the pull request! 🎉 While there are a few areas where you can improve, such as ensuring proper validation with the limitation_class and adding informative messages to exceptions, these are minor and don't impact the core functionality. Keep up the good work and consider these suggestions for future improvements!

✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨


def __set__(self, instance: type, value: int) -> None:
if not isinstance(value, int):
raise TypeError

Choose a reason for hiding this comment

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

This line raises a TypeError without a message. It's a good practice to provide a message to make debugging easier.

if not isinstance(value, int):
raise TypeError
if not (self.min_amount <= value <= self.max_amount):
raise ValueError

Choose a reason for hiding this comment

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

This line raises a ValueError without a message. Consider adding a message to provide more context about the error.


def can_access(self, visitor: Visitor) -> bool:
try:
self.limitation_class(visitor.age, visitor.weight, visitor.height)

Choose a reason for hiding this comment

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

The limitation_class is being instantiated with visitor attributes, but it seems like the intention is to validate the visitor against the slide's limitations. Ensure that the limitation_class is used correctly to validate the visitor.

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