Skip to content

Commit

Permalink
Adjust GoodTilDate Pep8 (#7921)
Browse files Browse the repository at this point in the history
- Pep8 adjustment for GoodTilDate, so it behaves like `Expiry` static
  readonly funcs which will be binded to both snake case and upper
  constant format, `good_til_date` & `GOOD_TIL_DATE`
  • Loading branch information
Martin-Molinero authored Apr 15, 2024
1 parent 2ff13ea commit 0e58c4c
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions Common/Orders/TimeInForce.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*
* QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
* Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation.
*
Expand Down Expand Up @@ -40,10 +40,7 @@ public abstract class TimeInForce : ITimeInForceHandler
/// <summary>
/// Gets a <see cref="GoodTilDateTimeInForce"/> instance
/// </summary>
public static TimeInForce GoodTilDate(DateTime expiry)
{
return new GoodTilDateTimeInForce(expiry);
}
public static Func<DateTime, TimeInForce> GoodTilDate => (DateTime expiry) => new GoodTilDateTimeInForce(expiry);

/// <summary>
/// Checks if an order is expired
Expand Down

0 comments on commit 0e58c4c

Please sign in to comment.