Skip to content

Conversation

@DianaRatnikova
Copy link

Не очень уверена, что поняла смысл None из constants правильно, местами использовала его, лишь бы использовать

Copy link
Contributor

@Melevir Melevir left a 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
Copy link
Contributor

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:
Copy link
Contributor

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:
Copy link
Contributor

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:
Copy link
Contributor

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:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

И емейл не может быть нан.

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