Skip to content

distance class solution#2795

Open
artemmurtazin27 wants to merge 2 commits into
mate-academy:masterfrom
artemmurtazin27:develop
Open

distance class solution#2795
artemmurtazin27 wants to merge 2 commits into
mate-academy:masterfrom
artemmurtazin27:develop

Conversation

@artemmurtazin27

Copy link
Copy Markdown

No description provided.

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Review Summary

Your implementation correctly fulfills all core functional requirements for the Distance class - all magic methods work as specified with both Distance instances and numeric types. The code is functionally complete and passing. However, there are two style checklist items to address: First, remove the unnecessary else statement in __iadd__ by restructuring to use early return or a ternary expression. Second, add from __future__ import annotations at the top of the file and remove the string quotes from your type annotations, changing "Distance | int" to Distance | int. Additionally, your type hints should include float where appropriate (e.g., int | float instead of just int) to fully support the requirements. These are style improvements that don't affect functionality but will bring your code into full compliance with the checklist.


✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨

Footnotes

  1. Rate AI review example

Comment thread app/main.py Outdated
Comment thread app/main.py Outdated
Comment thread app/main.py Outdated
Comment thread app/main.py Outdated
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