Skip to content
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

ElvesAndDwarves #1361

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

ElvesAndDwarves #1361

wants to merge 3 commits into from

Conversation

lapyasha
Copy link

No description provided.

Copy link

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

Choose a reason for hiding this comment

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

Thank you for your hard work on this project! While your code is mostly on the right track, there are a few critical issues that need to be addressed before we can approve the pull request:

  1. Type Hinting: The calculate_team_total_rating function should use List[Player] for the team parameter to align with the task requirements. This ensures that the function is flexible and can handle any Player type.

  2. Return Type Annotations: The get_rating method in the DwarfBlacksmith class should have a return type of int, as it returns self.skill_level, which is expected to be an integer.

  3. Parameter Type Hinting: The skill_level parameter in the DwarfBlacksmith class should be typed as int instead of None to accurately reflect its data type.

  4. Protected Attributes: Ensure that attributes like skill_level, hummer_level, bow_level, and favourite_spell are prefixed with an underscore to indicate they are protected, as per the task requirements.

These changes are important to ensure the functionality and adherence to the task requirements. Once these are addressed, your code will be in great shape! Keep up the great work, and don't hesitate to reach out if you have any questions or need further assistance. 😊

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

🔄 Fix the issues, commit the changes, and then re-request my review using the Re-request review button in the Reviewers tab.

app/main.py Outdated
from typing import List


def calculate_team_total_rating(team: List[Elf | Dwarf]) -> int:

Choose a reason for hiding this comment

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

The type hint for the team parameter should be List[Player] instead of List[Elf | Dwarf] to match the task description, which specifies that the function should take a list of Players.

self,
nickname: str,
favourite_dish: str,
skill_level: None

Choose a reason for hiding this comment

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

The skill_level parameter should have a type hint that reflects its actual data type, such as int, instead of None.

f"{self.nickname} with skill of the "
f"{self.skill_level} level")

def get_rating(self) -> None:

Choose a reason for hiding this comment

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

The get_rating method should have a return type hint of int instead of None, as it returns self.skill_level, which is expected to be an integer.

musical_instrument: str,
favourite_spell: str
) -> None:
super().__init__(nickname, musical_instrument)

Choose a reason for hiding this comment

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

Ensure that the Elf class constructor accepts nickname and musical_instrument as parameters. If the Elf class constructor has different parameters, adjust the super().__init__() call accordingly.

Copy link

@vsmutok vsmutok left a comment

Choose a reason for hiding this comment

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

Great!

Comment on lines +14 to +16
print(f""
f"{self.nickname} is playing a song on the "
f"{self.musical_instrument}")
Copy link

Choose a reason for hiding this comment

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

Suggested change
print(f""
f"{self.nickname} is playing a song on the "
f"{self.musical_instrument}")
print(
f"{self.nickname} is playing a song on the "
f"{self.musical_instrument}"
)

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.

3 participants