-
Notifications
You must be signed in to change notification settings - Fork 663
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
Aquapark validation done #660
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well done! I have left minor points for improvement of your code
app/main.py
Outdated
if not isinstance(value, int): | ||
raise TypeError(f"Expected an int, got {type(value)}") | ||
|
||
if value not in range(self.min_amount, self.max_amount + 1): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
using range can be a heavy op, use a < b < c
construction
app/main.py
Outdated
@@ -1,25 +1,98 @@ | |||
from abc import ABC | |||
from typing import Type, Any |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need to import Type, use from future import annotations
…s are necessary. Removed them, and used just SlideLimitationValidator in type hint for Slide class
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well done!
No description provided.