-
Notifications
You must be signed in to change notification settings - Fork 620
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 #274
solution #274
Conversation
app/main.py
Outdated
def __init__(self, age: int, weight: int, height: int) -> None: | ||
super().__init__(age, weight, height) |
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.
These lines are not needed. Remove them
app/main.py
Outdated
def __init__(self, age: int, weight: int, height: int) -> None: | ||
super().__init__(age, weight, height) |
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.
These lines are not needed. Remove them
app/main.py
Outdated
def __init__( | ||
self, | ||
name: str, | ||
limitation_class: SlideLimitationValidator |
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.
It accepts type, not instance
app/main.py
Outdated
limitation_class: ( | ||
ChildrenSlideLimitationValidator | AdultSlideLimitationValidator | ||
) |
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.
It accepts type of SlideLimitationValidator, not instances
app/main.py
Outdated
self.min_amount = min_amount | ||
self.max_amount = max_amount | ||
|
||
def __set_name__(self, instance, name: str) -> None: # noqa |
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.
noqa? why you need it? delete please
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.
Do you can explain me how write correct type hint for descriptor's methods?
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.
object
is a good idea for annotation
No description provided.