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

Lions- Jessica A. #94

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

Conversation

Jessicaenvisions
Copy link

No description provided.

Copy link

@goeunpark goeunpark left a comment

Choose a reason for hiding this comment

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

Great work, Jessica! 🎉

I'm so proud of how far you've come! Your tests pass, your classes look solid, your commit messages are frequent, and you are passing data through functions like a pro. This project is a well-deserved Green. 🟢

One small thing I wanted to point your attention towards was around consistent spacing. Generally, there should be just one newline at the end of a function and at the end of the file. Inside a function, I try to not create an empty line unless it really does help with organizing chunks of my code. For example, looking at your vendor.py, the code in get_best_by_category() feels really tight and concise while swap_items() just above is has good code, but the spacing makes it feel longer that necessary. This is also a skill that you develop over time; let me know if you'd like me to elaborate on this matter!

Overall, great work! Keep it up! ⭐


class Clothing(Item):
def __init__(self, condition= 0 ):

Choose a reason for hiding this comment

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

Make sure to clean up your code before submission with proper spaces (or in this case, no spaces) between the values before and after the =. Clean code goes a long way and I found this section in the PEP8 style convention really useful!

Comment on lines +5 to +6
super().__init__(category = category, condition = condition)

Choose a reason for hiding this comment

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

We can shorten L5-6 to one line by saying:

super().__init__(category="Clothing", condition=condition)

Comment on lines +10 to +12


Choose a reason for hiding this comment

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

🔥 Remove any unnecessary newlines at the end of your files!

from swap_meet.item import Item

class Decor(Item):

Choose a reason for hiding this comment

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

Flawless case of inheritance! Great work!

from swap_meet.item import Item


class Electronics(Item):

Choose a reason for hiding this comment

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

💯 💯 💯

my_item = self.inventory[0]

self.swap_items(another_vendor, my_item, another_item)

Choose a reason for hiding this comment

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

Wonderful use of the helper method!

Comment on lines +59 to +60
if item.condition > best_condition_rating:

Choose a reason for hiding this comment

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

We can also combine this into:

if item.category == category and item.condition > best_condition_rating:



if my_swap_item is not None and other_vendor_swap_item is not None:

Choose a reason for hiding this comment

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

We can also shorten this to the following because the values themselves will evaluate to Truthy:

if my_swap_item and other_vendor_swap_item

@@ -28,21 +28,27 @@ def test_integration_wave_01_02_03():
assert item1 not in vendor.inventory
assert remove_result == item1

print(f"This is vendor inventory{vendor.inventory}")

Choose a reason for hiding this comment

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

Remember to remove your debugging print statements after you finished using them! 😉

Comment on lines +39 to +42
assert len(items) == 0
assert item_a not in items
assert item_b not in items
assert item_c not in items

Choose a reason for hiding this comment

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

Nice! ✨

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.

2 participants