Skip to content

Commit

Permalink
Minor refactoring: rename function for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
woctezuma committed Mar 12, 2024
1 parent 50a07d0 commit f9996da
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions monitor_fixed_trophies.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
)
from src.webhook_utils import WEBHOOK_KEYWORD_FIXED_TROPHY

from src.git_utils import data_is_new
from src.git_utils import daily_data_has_just_been_fetched


def main() -> None:
if data_is_new():
if daily_data_has_just_been_fetched():
try:
data_yesterday = load_json(fname=get_fname_for_yesterday())
except FileNotFoundError:
Expand Down
2 changes: 1 addition & 1 deletion src/git_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def filter_status(stdout, pattern):
return [line for line in stdout.split(LINE_SEPARATOR) if pattern in line]


def data_is_new():
def daily_data_has_just_been_fetched():
stdout, stderr = git_status()
return filter_status(stdout, DATA_NAME_PATTERN)

Expand Down

0 comments on commit f9996da

Please sign in to comment.