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

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

Solution #1206

wants to merge 4 commits into from

Conversation

SerhiyDema
Copy link

attempt 01

app/main.py Outdated
Comment on lines 58 to 59
if self.current_load is None and isinstance(cargo, Cargo) \
and cargo.weight <= self.max_load_weight:
Copy link

Choose a reason for hiding this comment

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

Better to use () then \

app/main.py Outdated
Comment on lines 13 to 16
if coords and len(coords) >= 2:
self.coords = coords
else:
self.coords = [0, 0] # [x, y]
Copy link

Choose a reason for hiding this comment

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

use or instead if ... else

app/main.py Outdated
Comment on lines 36 to 37
if not (coords and len(coords) == 3):
coords = [0, 0, 0] # [x, y, z]
Copy link

Choose a reason for hiding this comment

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

use or instead if ... else

app/main.py Outdated
def __init__(self, name: str, weight: int, coords: list = None) -> None:
self.name = name
self.weight = weight
self.coords = coords or [0, 0] # [x, y]

Choose a reason for hiding this comment

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

delete all comments, use docstring isntead of it if you need

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