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

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

Solution #612

wants to merge 3 commits into from

Conversation

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

Your code is well-structured and clean, but there are a few points that need to be addressed before I can approve it. The coupling between the Slide and Visitor classes, the use of exceptions in the can_access method, and the error message in the ValueError exception are areas that need improvement. Keep going! You're almost there! 😊

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

app/main.py Outdated Show resolved Hide resolved
app/main.py Show resolved Hide resolved
app/main.py Outdated Show resolved Hide resolved
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 so far! 👏 However, there are a few areas where we could improve. Let's try to return a string explaining why access was denied in the can_access method. This will make it more informative for the user. Also, let's work on handling exceptions more effectively by narrowing down the scope of the try block. Lastly, let's provide a custom error message for ValueError to make debugging easier. Keep up the good work! 💪

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

app/main.py Outdated Show resolved Hide resolved
app/main.py Show resolved Hide resolved
app/main.py Show resolved Hide resolved
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 code! It's quite readable and the logic seems to be correct. However, there are a few areas that could be improved. The 'can_access' method in the Slide class should be optimized to avoid creating new instances unnecessarily. The SlideLimitationValidator classes need actual validation methods. The SlideLimitationValidator base class should not be an ABC if it doesn't have abstract methods. The Visitor class needs parameter validation, and the IntegerRange class could be renamed for clarity. Keep up the good work and remember to review these comments to improve your code. 🚀

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

app/main.py Show resolved Hide resolved
app/main.py Show resolved Hide resolved
app/main.py Show resolved Hide resolved
app/main.py Show resolved Hide resolved
app/main.py Show resolved Hide resolved
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