Skip to content

Commit

Permalink
sort intrinio output
Browse files Browse the repository at this point in the history
  • Loading branch information
deeleeramone committed May 18, 2024
1 parent 8f2a709 commit caa15ae
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ class IntrinioForwardEbitdaEstimatesQueryParams(ForwardEbitdaEstimatesQueryParam
)
estimate_type: Optional[
Literal[
"ebitda",
"ebitda",
"ebit",
"enterprise_value",
Expand Down Expand Up @@ -190,4 +189,6 @@ def transform_data(
if not results:
raise EmptyDataError()

return results
return sorted(
results, key=lambda x: (x.fiscal_year, x.last_updated), reverse=True
)

0 comments on commit caa15ae

Please sign in to comment.