Conversation
Melevir
left a comment
There was a problem hiding this comment.
Не сдавай такой большой кучей: ошибок много и каждую ошибку ты повторяешь по много раз, получается. Давай этот пр смерджи и приноси по очереди исправления для каждого уровня.
level_1/3.py
Outdated
| @@ -1,10 +1,10 @@ | |||
| from constants import ___ | |||
| from constants import none_type | |||
There was a problem hiding this comment.
Да не надо использовать этот none_type! Просто пиши None в аннотации и всё
level_2/10.py
Outdated
|
|
||
|
|
||
| def is_point_in_square(point: ___, left_upper_corner: ___, right_bottom_corner: ___) -> ___: | ||
| def is_point_in_square(point: tuple[int], left_upper_corner: tuple[int], right_bottom_corner: tuple[int]) -> bool: |
There was a problem hiding this comment.
tuple[int] – это тупл из одного инта, вот такой: (1, ).
Тупл из двух интов – это tuple[int, int]
level_2/3.py
Outdated
|
|
||
|
|
||
| def get_transaction_amount(transaction_id: ___, transactions_amounts_map: ___) -> ___: | ||
| def get_transaction_amount(transaction_id:int, transactions_amounts_map: dict{int, decimal.decimal}) -> dict{int, decimal.decimal}|none_type: |
There was a problem hiding this comment.
Тут у dict должны быть квадратные скобки, а не фигурные
level_2/4.py
Outdated
|
|
||
|
|
||
| def ban_users(users_ids: ___) -> ___: | ||
| def ban_users(users_ids: set) -> int: |
level_2/6.py
Outdated
|
|
||
|
|
||
| def is_name_male(name: ___, name_gender_map: ___) -> ___: | ||
| def is_name_male(name: StopIteration, name_gender_map: dict{str, bool}) -> bool: |
There was a problem hiding this comment.
Первая аннотация неправильная, во второй неверные скобки
level_2/8.py
Outdated
|
|
||
|
|
||
| def calculate_total_spent_for_users(users_ids: ___, users_ids_to_users_map: ___) -> ___: | ||
| def calculate_total_spent_for_users(users_ids: set[int], users_ids_to_users_map: dict[int, set(str, int, list[int])]) -> int: |
There was a problem hiding this comment.
Опять неправильные скобки и тип значений в словаре не тот
level_2/9.py
Outdated
|
|
||
|
|
||
| def parse_receipt(raw_receipt: ___) -> ___: | ||
| def parse_receipt(raw_receipt: str) -> tuple(int, datetime.datetime(), list[tuple[str, int, float]]): |
There was a problem hiding this comment.
Не те скобки и неправильный тип даты
level_3/1.py
Outdated
|
|
||
|
|
||
| def get_transaction_amount(transaction_id: ___, transactions_amounts_map: ___) -> ___: | ||
| def get_transaction_amount(transaction_id: int, transactions_amounts_map: Mapping[int, decimal.Decimal]) -> decimal.Decimal|None: |
There was a problem hiding this comment.
Вокруг вертикальной черты тоже принято пробелы ставить
level_3/2.py
Outdated
|
|
||
|
|
||
| def calculate_total_spent_for_user(user: ___) -> ___: | ||
| def calculate_total_spent_for_user(user: TypedDict) -> int: |
There was a problem hiding this comment.
Неправильно. Почитай про тайпдикты сперва
level_3/3.py
Outdated
|
|
||
|
|
||
| def create_user(user_name: ___, user_age: ___, after_created: ___) -> ___: | ||
| def create_user(user_name: str, user_age: int, after_created: None) -> None: |
There was a problem hiding this comment.
Неправильная аннотация последнего аргумента
|
Попробую смерджить и пуллреквестнуть исправления |
No description provided.