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 #1197

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

Conversation

PonomaryovNikita
Copy link

No description provided.

app/main.py Outdated
) -> None:
super().__init__(weight)
self.name = name
if coords is None:
Copy link

Choose a reason for hiding this comment

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

Simplify to
self.coords = coords or [0, 0]

app/main.py Outdated
weight: int,
coords: list = None
) -> None:
super().__init__(name, weight, coords)
Copy link

Choose a reason for hiding this comment

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

simplify to super().__init__(name, weight, coords or [0, 0, 0])

app/main.py Outdated
weight: int,
coords: list = None,
max_load_weight: int = 0,
current_load: int = None
Copy link

Choose a reason for hiding this comment

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

Correct annotation for current_load
You should cover both Cargo and None in annotations for current_load

Copy link

Choose a reason for hiding this comment

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

Cargo | None = None

Copy link

Choose a reason for hiding this comment

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

current_load: Cargo | None = None

app/main.py Outdated
weight: int,
coords: list = None,
max_load_weight: int = 0,
current_load: int = None
Copy link

Choose a reason for hiding this comment

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

Cargo | None = None

app/main.py Outdated
weight: int,
coords: list = None,
max_load_weight: int = 0,
current_load: int = None
Copy link

Choose a reason for hiding this comment

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

current_load: Cargo | None = None

app/main.py Outdated
Comment on lines 7 to 11
def __init__(self,
name: str,
weight: int,
coords: list = None
) -> None:

Choose a reason for hiding this comment

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

place each argument including self on a new line

Copy link

@viktoria-rybenchuk viktoria-rybenchuk left a comment

Choose a reason for hiding this comment

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

Well done!

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