Software engineers 1#2242
Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
I am requesting changes because there are still a few critical issues that will break the required behavior and tests. The base class method is named learn_skills instead of learn_skill, which means any tests calling learn_skill will fail even though the logic is correct. The FrontendDeveloper.create_awesome_web_page method must return exactly "<h1>Hello world</h1>", but your implementation adds an exclamation mark, so string comparisons will not match. The AndroidDeveloper class is missing entirely, so the required features (default skills "Java", "Android studio" and the create_smooth_mobile_app method returning "Ads every three swipes") are not implemented. Also, FullStackDeveloper currently does not end up with both backend and frontend skills, and its __init__ overrides the parent just to call super().__init__, which violates the checklist about avoiding such overrides and prevents FrontendDeveloper.__init__ from contributing its skills.
To fix the critical points:
- Rename
learn_skillstolearn_skillwhile keeping the existing behavior. - Change the return value of
create_awesome_web_pageto exactly"<h1>Hello world</h1>"(no exclamation mark). - Implement
AndroidDeveloper(SoftwareEngineer)that extendsskillswith"Java"and"Android studio"in__init__, and addcreate_smooth_mobile_appthat prints the required message and returns"Ads every three swipes". - Rework
FullStackDeveloperso that, via multiple inheritance and/or cooperative__init__, both backend and frontend default skills are added, and avoid an__init__that only callssuper().__init__with the same arguments. As a minor improvement, you can also simplify the__init__signatures ofFrontendDeveloperandBackendDeveloperto just(self, name: str) -> Noneand add missing type hints to satisfy the linter, but these style issues are secondary to the functional fixes. You’re very close; once these core requirements are addressed, your solution will align well with the task and checklist.
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
Important
Fix the issues, commit the changes, and then re-request my review using the Re-request review button2 in the Reviewers tab.
Tip
If you have any comments about this review, please leave a message in the Add a comment section below and mention me with the @mateacademy-ai-mentor tag3.
I will read your message during my next review of your pull request. Please do not reply directly to my comments, as that feature is not supported yet.
Caution
Do not close the pull request until the review is complete. Closing it early can lead to unexpected behavior and disrupt the review process.
Footnotes
| self.name = name | ||
| self.skills = [] | ||
|
|
||
| def learn_skills(self, skill): |
There was a problem hiding this comment.
Method name should be learn_skill (singular) to match the task requirements; with learn_skills tests calling learn_skill will fail.
|
|
||
| def create_awesome_web_page(self): | ||
| print(f"{self.name} is creating a webpage...") | ||
| return "<h1>Hello world!</h1>" |
There was a problem hiding this comment.
The return string must be exactly "<h1>Hello world</h1>" as specified; the extra exclamation mark will break exact string comparisons.
|
|
||
|
|
||
| class FrontendDeveloper(SoftwareEngineer): | ||
| def __init__(self, name, *args, **kwargs): |
There was a problem hiding this comment.
Overriding __init__ with only super().__init__(name, *args, **kwargs) adds no extra logic and contradicts checklist item #4 about avoiding such overrides; simplify the signature and/or add real logic if needed.
|
|
||
|
|
||
| class BackendDeveloper(SoftwareEngineer): | ||
| def __init__(self, name, *args, **kwargs): |
There was a problem hiding this comment.
Overriding __init__ with only super().__init__(name, *args, **kwargs) adds no extra logic and contradicts checklist item #4; this is the same pattern as the bad example in the checklist.
|
|
||
|
|
||
| class FullStackDeveloper(BackendDeveloper, FrontendDeveloper): | ||
| def __init__(self, name): |
| return "http://127.0.0.1:8000" | ||
|
|
||
|
|
||
| class FullStackDeveloper(BackendDeveloper, FrontendDeveloper): |
There was a problem hiding this comment.
Currently there is no AndroidDeveloper class in this file, but the description requires it with specific default skills and create_smooth_mobile_app method; you need to add that implementation.
| def __init__(self, name): | ||
| super().__init__(name) | ||
|
|
||
| def create_web_application(self): |
There was a problem hiding this comment.
With the current multiple inheritance and __init__ chain, FrontendDeveloper.__init__ is never called, so FullStackDeveloper.skills will lack frontend skills; adjust inheritance/initialization so both backend and frontend skills are included as required.
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
I am requesting changes because there is still a critical checklist violation in app/main.py related to FullStackDeveloper.__init__, even though all functional requirements appear to work. Your __init__ currently calls super().__init__(name) and then manually assigns self.skills to a hard-coded combined list, which breaks [CHECKLIST ITEM #3] and the explicit rule about avoiding __init__ overrides that only delegate to super() and re‑do parent logic. This is critical because the task explicitly requires using cooperative multiple inheritance (or adjusted parent __init__ methods) so that a FullStackDeveloper’s skills are composed via the parent classes’ initialization, not by manually resetting self.skills in the child.
The concrete issue to fix is: in FullStackDeveloper.__init__ (check around the class definition for FullStackDeveloper in app/main.py), remove or refactor this method so that you either (1) don’t override __init__ at all and rely on the MRO to call both BackendDeveloper and FrontendDeveloper initializers cooperatively, or (2) implement a cooperative __init__ chain where each parent adds its own skills without you hardcoding the final list. In other words, FullStackDeveloper("Tom").skills should still end up with the correct backend + frontend skills, but that result must come from the parent classes’ logic (through super() chains), not from a manual combined list in FullStackDeveloper. Everything else in your solution—the classes, methods, prints, and return values—looks good and aligned with the specification, so once you adjust this __init__ design, your implementation will fully meet the requirements. Keep going; you’re very close and this change will give you cleaner, more maintainable multiple inheritance behavior.
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
Important
Fix the issues, commit the changes, and then re-request my review using the Re-request review button2 in the Reviewers tab.
Tip
If you have any comments about this review, please leave a message in the Add a comment section below and mention me with the @mateacademy-ai-mentor tag3.
I will read your message during my next review of your pull request. Please do not reply directly to my comments, as that feature is not supported yet.
Caution
Do not close the pull request until the review is complete. Closing it early can lead to unexpected behavior and disrupt the review process.
Footnotes
|
|
||
|
|
||
| class FullStackDeveloper(BackendDeveloper, FrontendDeveloper): | ||
| def __init__(self, name: str) -> None: |
There was a problem hiding this comment.
This __init__ overrides the parent only to call super().__init__(name) and then manually assigns skills to a hard-coded list of backend + frontend skills. This violates checklist item #3 ("Make sure not to override a method, if you do not add additional logic inside") and the rule about avoiding __init__ overrides that just delegate to super(); instead, rely on cooperative multiple inheritance (or adjust parent __init__ methods) so that the combined skills come from the parents without manually resetting self.skills.
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
I am approving your solution as an educational override so you can continue progressing while you refine your understanding of cooperative multiple inheritance.
You did a solid job implementing the required classes and methods: SoftwareEngineer, the specialized developer subclasses, and the skills list behavior all match the functional requirements, and your methods print/return the correct values. The main remaining issue is in app/main.py within FullStackDeveloper.__init__ (around the constructor definition): you currently call super().__init__(name) and then manually extend self.skills with frontend skills, which partially redoes parent logic and conflicts with the requirement that FullStackDeveloper("Tom").skills be composed only via parent initialization and [CHECKLIST ITEM #3]. To improve this, restructure your parent classes so each __init__ cooperates via super() and accumulates its own skills, and then let FullStackDeveloper either not define __init__ at all or only call super().__init__(name) without extra extend calls; this will also help avoid duplicate skills.
Overall, your design shows good understanding of inheritance and method behavior, and with a small refactor of the FullStackDeveloper initialization chain, you’ll fully align with the checklist and best practices for multiple inheritance.
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
Important
Fix the issues, commit the changes, and then re-request my review using the Re-request review button2 in the Reviewers tab.
Tip
If you have any comments about this review, please leave a message in the Add a comment section below and mention me with the @mateacademy-ai-mentor tag3.
I will read your message during my next review of your pull request. Please do not reply directly to my comments, as that feature is not supported yet.
Caution
Do not close the pull request until the review is complete. Closing it early can lead to unexpected behavior and disrupt the review process.
Footnotes
|
|
||
|
|
||
| class FullStackDeveloper(BackendDeveloper, FrontendDeveloper): | ||
| def __init__(self, name: str) -> None: |
There was a problem hiding this comment.
This __init__ violates the requirement that FullStackDeveloper("Tom").skills be composed via parent initialization logic rather than by manually recombining skills, and it conflicts with checklist item #3 about not overriding methods just to redo parent behavior. Refactor so that FullStackDeveloper relies on cooperative multiple inheritance (super() chains) to accumulate both backend and frontend skills, without manually extending self.skills here.
meruyme
left a comment
There was a problem hiding this comment.
Parabéns pelo trabalho, Anderson! Seu código está 90% correto, mas serão necessárias algumas alterações no seu init da classe FullstackDeveloper, deixei uns comentários nas linhas específicas para ficar mais fácil de você consultar! Após essas modificações, seu código estará pronto para aprovação.
Continue assim e bons estudos!
| class FullStackDeveloper(BackendDeveloper, FrontendDeveloper): | ||
| def __init__(self, name: str) -> None: | ||
| super().__init__(name) | ||
| self.skills.extend(["JavaScript", "HTML", "CSS"]) |
There was a problem hiding this comment.
Anderson, aqui você não precisa fazer esse extends novamente, como você está chamando o init das duas classes pai (o Python faz isso automaticamente quando temos heranças múltiplas e usamos o init com o super), o skills já está com os dados referentes do FrontendDeveloper.
| def __init__(self, name: str) -> None: | ||
| super().__init__(name) | ||
| self.skills.extend(["JavaScript", "HTML", "CSS"]) | ||
| self.skills = list(dict.fromkeys(self.skills)) |
There was a problem hiding this comment.
Não precisa dessa linha aqui também, creio que você a usou para remover os duplicados, mas se você já remover a linha acima dessa, não haverá duplicatas na lista!
meruyme
left a comment
There was a problem hiding this comment.
Parabéns pelo trabalho, Anderson! Vi que você seguiu minhas orientações, seu código está 100% correto agora!
Continue com o bom trabalho e bons estudos!
No description provided.