Skip to content
This repository was archived by the owner on Oct 22, 2024. It is now read-only.

chore(ref): Improve Codebase and Refactor some functions - #68

Closed
yezz123 wants to merge 1 commit into
deta:masterfrom
yezz123:ref
Closed

chore(ref): Improve Codebase and Refactor some functions#68
yezz123 wants to merge 1 commit into
deta:masterfrom
yezz123:ref

Conversation

@yezz123

@yezz123 yezz123 commented Mar 21, 2022

Copy link
Copy Markdown

What's Changed:

  • Swap if/else branches of if expression to remove negation
  • Replace if statement with if the expression
  • Remove unnecessary else after guard condition

a little improvement in the codebase could help to refactor and performance for the upcoming functions in Deta client.

@abdelhai abdelhai added help wanted Extra attention is needed investigating labels May 17, 2022
@lemonyte lemonyte mentioned this pull request May 17, 2022
Comment thread deta/base.py
return res
elif code == 409:
raise Exception("Item with key '{4}' already exists".format(key))
raise ValueError("Item with key '{4}' already exists".format(key))

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I think this one should be changed into f-string too

Suggested change
raise ValueError("Item with key '{4}' already exists".format(key))
raise ValueError(f"Item with key '{key}' already exists")

@yezz123 yezz123 closed this by deleting the head repository Feb 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

help wanted Extra attention is needed investigating

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants