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

Solution #1234

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

Solution #1234

wants to merge 3 commits into from

Conversation

Den-k0
Copy link

@Den-k0 Den-k0 commented Oct 6, 2024

No description provided.

app/main.py Outdated
Comment on lines 11 to 12
if coords is None:
self.coords = [0, 0]
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if coords is None:
self.coords = [0, 0]
if self.coords = coords or [0, 0]

app/main.py Outdated
# write your code here

class BaseRobot:
def __init__(self, name: str, weight: int, coords: list = None) -> None:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
def __init__(self, name: str, weight: int, coords: list = None) -> None:
def __init__(self, name: str, weight: int, coords: list[int] = None) -> None:

app/main.py Outdated
Comment on lines 34 to 35
if coords is None:
self.coords = [0, 0, 0]
Copy link
Contributor

Choose a reason for hiding this comment

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

the same here

@Den-k0 Den-k0 requested a review from Nattalli October 8, 2024 13:47
app/main.py Outdated
) -> None:
self.name = name
self.weight = weight
self.coords = coords if coords is not None else [0, 0]
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
self.coords = coords if coords is not None else [0, 0]
self.coords = coords or [0, 0]

app/main.py Outdated
class FlyingRobot(BaseRobot):
def __init__(self, name: str, weight: int, coords: list = None) -> None:
super().__init__(name, weight, coords)
self.coords = coords if coords is not None else [0, 0, 0]
Copy link
Contributor

Choose a reason for hiding this comment

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

and here

@Den-k0 Den-k0 requested a review from Nattalli October 8, 2024 14:05
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