Skip to content

3.Яковлев Владислав Артёмович 613 - #70

Open
phoxxa wants to merge 10 commits into
python-department:mainfrom
phoxxa:main
Open

phoxxa wants to merge 10 commits into
python-department:mainfrom
phoxxa:main

Conversation

@phoxxa

@phoxxa phoxxa commented Sep 25, 2026

Copy link
Copy Markdown

No description provided.

@phoxxa phoxxa changed the title 1.Яковлев Владислав Артёмович 613 2.Яковлев Владислав Артёмович 613 Oct 4, 2026
@phoxxa phoxxa closed this Oct 12, 2026
@phoxxa phoxxa reopened this Oct 12, 2026
@phoxxa phoxxa changed the title 2.Яковлев Владислав Артёмович 613 3.Яковлев Владислав Артёмович 613 Oct 12, 2026
Comment thread src/part1/constants.py
changing a width keeps everything else consistent.
"""

from typing import Final

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

На момент дедлайна не проходил ruff check

Comment thread src/part1/snowflake.py
return None

snowflake_id = (
(timestamp_ms << (NODE_ID_BITS + SEQUENCE_ID_BITS))

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Вычисление сдвига дублировано в функции decode_timestamp_ms. Это может быть опасно, так как если логика поменяется, то надо будет исправлять в 2х местах, а это можно забыть, поэтому лучше было вынести вычисление в отдельную константу.Если бы работа оценивалась, то ставился бы минус балл по пункте S1 из критериев

Comment thread src/part2/cart.py

if cart_quantity < quantity:
print(
f"cart holds only {cart_quantity} unit(s) of product "

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

На момент дедлайна не проходил ruff check

Comment thread src/part2/crud.py
return 0

for index, product in enumerate(storage):
if product[PRODUCT_ID_INDEX] == product_id:

@Avshugan Avshugan Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Цикл:

for index, product in enumerate(storage):
        if product[PRODUCT_ID_INDEX] == product_id:

встречается несколько раз, лучше было бы использовать везде read_product. Код был бы понятнее.
Пункт S1

Comment thread src/part3/run_admin.py
"""Parse one console line and carry out the command it names.
parts = line.split()

if parts == ["exit"]:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

match case был бы попроще, код был бы понятнее
Минус 0.5 балла

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