Skip to content

Commit 783a338

Browse files
authored
FileCache.directory: explictly allow pathlib.Path (#322)
1 parent 65cf315 commit 783a338

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cachecontrol/caches/file_cache.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
import hashlib
77
import os
88
from textwrap import dedent
9-
from typing import IO, TYPE_CHECKING
9+
from typing import IO, TYPE_CHECKING, Union
10+
from pathlib import Path
1011

1112
from cachecontrol.cache import BaseCache, SeparateBodyBaseCache
1213
from cachecontrol.controller import CacheController
@@ -63,7 +64,7 @@ class _FileCacheMixin:
6364

6465
def __init__(
6566
self,
66-
directory: str,
67+
directory: Union[str, Path],
6768
forever: bool = False,
6869
filemode: int = 0o0600,
6970
dirmode: int = 0o0700,

0 commit comments

Comments
 (0)