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

Done! #1470

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

Done! #1470

wants to merge 2 commits into from

Conversation

Uklonsd
Copy link

@Uklonsd Uklonsd commented Dec 26, 2024

No description provided.

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

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

Great job on implementing the cache decorator! 🎉 Your code meets the task requirements and constraints, effectively storing and retrieving results as needed. While there are a couple of minor issues, such as using mutable types as dictionary keys and the wrapper function returning None, these don't significantly impact the functionality. Keep up the good work, and consider addressing these points to enhance your code further! 😊

✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨

app/main.py Outdated
pass
cache_storage = {}

def wrapper(*args) -> None:

Choose a reason for hiding this comment

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

The wrapper function is currently defined to return None, but it should return the result of the function call. Change the return type from None to the appropriate type, or remove the type hint if it's not necessary.

cache_storage = {}

def wrapper(*args) -> None:
if args in cache_storage:

Choose a reason for hiding this comment

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

Using mutable types (like lists) as dictionary keys can lead to errors because they are not hashable. Ensure that the arguments used as keys in cache_storage are immutable (e.g., tuples).

Copy link

@Alkaponees Alkaponees left a comment

Choose a reason for hiding this comment

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

LGMT!

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