-
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 #289
base: master
Are you sure you want to change the base?
Solution #289
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.
Please fix type annotations
Co-authored-by: Viktoria Pavlej <[email protected]>
Co-authored-by: Viktoria Pavlej <[email protected]>
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.
Fix the type annotations in all methods, but overall well done and approved
def __get__(self, instance: object, owner: type) -> int: | ||
return getattr(instance, self.protected_name) | ||
|
||
def __set__(self, instance: Any, value: int) -> None: |
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.
def __set__(self, instance: Any, value: int) -> None: | |
def __set__(self, instance: object, value: int) -> None: |
self.min_amount = min_amount | ||
self.max_amount = max_amount | ||
|
||
def __set_name__(self, owner: Any, name: str) -> None: |
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.
def __set_name__(self, owner: Any, name: str) -> None: | |
def __set_name__(self, owner: type, name: str) -> None: |
No description provided.