-
Notifications
You must be signed in to change notification settings - Fork 63
Pull request for level 1 #12
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
base: main
Are you sure you want to change the base?
Conversation
Melevir
left a comment
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.
Исправляй странное с none_type и ещё пару мелочей и будет нормас :)
level_1/1.py
Outdated
| @@ -1,7 +1,7 @@ | |||
| from constants import ___ | |||
| from constants import none_type | |||
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.
Нет, этот импорт нужен просто как плейсхолдер "напишите аннотацию тут". Тебе надо написать аннотации вместо ___, поудалять эти ненужные импорты, а для нан использовать None.
level_1/1.py
Outdated
|
|
||
|
|
||
| def is_user_banned(user_id: ___) -> ___: | ||
| def is_user_banned(user_id: int|none_type) -> bool: |
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.
Тут user_id не может быть нан, нет такого ни в примерах ни по смыслу не подходит.
level_1/10.py
Outdated
|
|
||
|
|
||
| def stringify(value: ___) -> ___: | ||
| def stringify(value: none_type|str) -> str: |
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.
Тут value может быть много чем кроме строки и нана, так что аннотация неправильная.
level_1/4.py
Outdated
|
|
||
|
|
||
| def calculate_age(date_of_birth: ___) -> ___: | ||
| def calculate_age(date_of_birth: datetime.date|none_type) -> int: |
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.
Дата рождения тоже не может быть нан.
level_1/5.py
Outdated
|
|
||
|
|
||
| def is_correct_email(raw_email: ___) -> ___: | ||
| def is_correct_email(raw_email: str|none_type) -> bool: |
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.
И емейл не может быть нан.
Lvl1 task3 edit1
Применила Callable
Не очень уверена, что поняла смысл None из constants правильно, местами использовала его, лишь бы использовать