Skip to content
This repository has been archived by the owner on Nov 21, 2021. It is now read-only.

Sourcery refactored master branch #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion run.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def index(
]
# 判断 prize
for comp in competitions:
if (comp["prize"] == "NaN") or (comp["prize"] == "Kaggle Swag"):
if comp["prize"] in ["NaN", "Kaggle Swag"]:
Copy link
Author

Choose a reason for hiding this comment

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

Function index refactored with the following changes:

  • Replace multiple comparisons of same variable with in operator (merge-comparisons)

comp.update({"howprize": ["unrewarded"]})
else:
comp.update({"howprize": ["rewarded"]})
Expand Down