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

Initial Commit (Sourcery refactored) #143

Closed
wants to merge 1 commit into from
Closed
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 looptrader/basetypes/Strategy/singlebydeltastrategy.py
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ def get_next_expiration(
"""Checks an option chain response for the next expiration date."""
logger.debug("get_next_expiration")

if expirations is None or expirations == []:
if expirations is None or not expirations:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Function SingleByDeltaStrategy.get_next_expiration refactored with the following changes:

logger.error("No expirations provided.")
return None

Expand Down