Skip to content

Commit

Permalink
Make cache_df decoration more apparent Klimatbyran#682
Browse files Browse the repository at this point in the history
* Hint a return type that is the same as the decorated function.
  • Loading branch information
joakimbits committed Sep 24, 2024
1 parent 5627a2d commit 9dac37d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion data/issues/emissions/cache_utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import pandas as pd


def cache_df(f: type(pd.read_excel) = None, path: str = '', freq: str = '1Y'):
def cache_df(f: type(pd.read_excel) = None, path: str = '', freq: str = '1Y') -> type(pd.read_excel):
"""
Cache the DataFrame to an intermediate file and use it if created within the same period.
Expand Down

0 comments on commit 9dac37d

Please sign in to comment.