-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[COST-4175] Fix AWS first of the month issue (#487)
* Just get the values view Do not both returning and then disccarding the keys view. * Simplfy generated_end_date determination - Use nested .get() calls instead of conditionals - Store the value instead of doing repeated attribute lookups - Default to today() * Reduce attribute lookups and improve legibility It’s expensive in CPython to keep looking up attributes, plus it hurts legibility greatly here. Lookup up the attributes once and store the values to make the conditionals much easier to read and improve performance. Compare both the month and day of month_end and end_date in order to determine if they are the same. It may be sufficient to compare only day, but it seems. more accurate to compare both month and day. * Increase test coverage * Extend test_create_generator_for_dates_from_yaml_first_month Co-authored-by: Sam Doran <sdoran@redhat.com>
- Loading branch information
Showing
4 changed files
with
115 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
__version__ = "4.4.15" | ||
__version__ = "4.4.16" | ||
|
||
VERSION = __version__.split(".") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters