-
Notifications
You must be signed in to change notification settings - Fork 63
Edit2 #16
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?
Edit2 #16
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.
Не сдавай такой большой кучей: ошибок много и каждую ошибку ты повторяешь по много раз, получается. Давай этот пр смерджи и приноси по очереди исправления для каждого уровня.
level_1/3.py
Outdated
| @@ -1,10 +1,10 @@ | |||
| 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_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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Тут у dict должны быть квадратные скобки, а не фигурные
level_2/4.py
Outdated
|
|
||
|
|
||
| def ban_users(users_ids: ___) -> ___: | ||
| def ban_users(users_ids: set) -> 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_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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Первая аннотация неправильная, во второй неверные скобки
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Опять неправильные скобки и тип значений в словаре не тот
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Не те скобки и неправильный тип даты
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Вокруг вертикальной черты тоже принято пробелы ставить
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Неправильно. Почитай про тайпдикты сперва
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Неправильная аннотация последнего аргумента
|
Попробую смерджить и пуллреквестнуть исправления |
No description provided.