Skip to content

Commit

Permalink
remote: add type hints
Browse files Browse the repository at this point in the history
  • Loading branch information
nijel committed Sep 5, 2023
1 parent 21db0b3 commit be24d42
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions weblate_web/management/commands/background_fetch.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ def disable_stale_services(self):

def handle(self, *args, **options):
self.disable_stale_services()
get_contributors(True)
get_activity(True)
get_changes(True)
get_contributors(force=True)
get_activity(force=True)
get_changes(force=True)
6 changes: 3 additions & 3 deletions weblate_web/remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
CACHE_TIMEOUT = 72 * 3600


def get_contributors(force=False):
def get_contributors(force: bool = False):
key = "wlweb-contributors"
results = cache.get(key)
if not force and results is not None:
Expand Down Expand Up @@ -66,7 +66,7 @@ def get_contributors(force=False):
return data


def get_activity(force=False):
def get_activity(force: bool = False):
key = "wlweb-activity-stats"
results = cache.get(key)
if not force and results is not None:
Expand All @@ -87,7 +87,7 @@ def get_activity(force=False):
return data


def get_changes(force=False):
def get_changes(force: bool = False):
key = "wlweb-changes-list"
results = cache.get(key)
if not force and results is not None:
Expand Down

0 comments on commit be24d42

Please sign in to comment.