Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Dec 19, 2022
1 parent ff20304 commit 9afb85b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions flexget/tests/test_tmdb.py
@@ -1,6 +1,7 @@
import datetime

import pytest

from flexget.components.tmdb.api_tmdb import TMDBSearchResult
from flexget.manager import Session

Expand Down
7 changes: 4 additions & 3 deletions flexget/utils/cache.py
@@ -1,14 +1,14 @@
import hashlib
import os
from functools import lru_cache, wraps
from datetime import datetime, timedelta
from functools import lru_cache, wraps
from typing import Tuple


import requests
from flexget.utils.tools import parse_timedelta
from loguru import logger

from flexget.utils.tools import parse_timedelta

logger = logger.bind(name='utils.cache')


Expand Down Expand Up @@ -100,6 +100,7 @@ def timed_lru_cache(timeout: str, maxsize: int = 128):
maxsize: max size
"""

def wrapper_cache(func):
func = lru_cache(maxsize=maxsize)(func)
func.timeout = parse_timedelta(timeout)
Expand Down

0 comments on commit 9afb85b

Please sign in to comment.