Skip to content

refactor: apply linting fixes and add type annotations#60

Open
hasan613 wants to merge 2 commits intoruslansenatorov:devfrom
hasan613:feat-calc-fix
Open

refactor: apply linting fixes and add type annotations#60
hasan613 wants to merge 2 commits intoruslansenatorov:devfrom
hasan613:feat-calc-fix

Conversation

@hasan613
Copy link
Copy Markdown

@hasan613 hasan613 commented Feb 14, 2026

Что изменено:
- Исправлена логическая ошибка в функции calculator: теперь переменная operation считывается как строка, а не int, что позволило корректно сравнивать её со знаками операций.
- Добавлены аннотации типов (Type Annotations) для функции calculator для прохождения проверки mypy.
- Добавлены строки документации (docstrings) для модуля и функции согласно требованиям pylint.
- Код отформатирован инструментами black и docformatter.

Почему это важно:
- Это исправляет падение программы при вводе математических знаков.
- Приводит код к стандарту PEP 8, делая его более читаемым и поддерживаемым.

closes #61

@hasan613 hasan613 changed the title refactor: apply linting fixes and add type annotations refactor: apply linting fixes and add type annotations (#61) Feb 14, 2026
@hasan613 hasan613 changed the title refactor: apply linting fixes and add type annotations (#61) refactor: apply linting fixes and add type annotations Feb 14, 2026
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.

Bug: Type Mismatch in Arithmetic Operation Comparison

1 participant