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

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

solution #623

wants to merge 1 commit into from

Conversation

piotrzegarek
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 system for validating visitor access to slides! 🎉 Your code meets the task requirements and constraints effectively. While there are a few areas for improvement, such as adding descriptive messages to exceptions and ensuring limitation_class is an instance rather than a class, these are minor issues that don't impact the core functionality. Keep up the great 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 __set__(self, instance: Any, value: Any) -> 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.

The TypeError raised here lacks a descriptive message. Consider adding a message to indicate that the value must be an integer.

raise TypeError

if value < self.min_amount or 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.

The ValueError raised here lacks a descriptive message. Consider adding a message to indicate that the value must be within the specified range.

limitation_class: SlideLimitationValidator
) -> None:
self.name = name
self.limitation_class = limitation_class

Choose a reason for hiding this comment

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

The limitation_class should be an instance of a validator class, not the class itself. Consider instantiating the validator class before assigning it to self.limitation_class.

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