Skip to content

Commit 07573cc

Browse files
committed
Support int yt_max_cache_size value
commit_hash:443450a73a63f3f42016fc0470f4d564e66ed281
1 parent b1bc2ed commit 07573cc

File tree

1 file changed

+3
-1
lines changed
  • devtools/ya/yalibrary/store/yt_store/opts_helper

1 file changed

+3
-1
lines changed

devtools/ya/yalibrary/store/yt_store/opts_helper/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
import humanfriendly
22

33

4-
def parse_yt_max_cache_size(raw_size: str | None) -> str | int | None:
4+
def parse_yt_max_cache_size(raw_size: int | str | None) -> str | int | None:
55
if not raw_size:
66
return None
7+
if isinstance(raw_size, int):
8+
return raw_size
79
raw_size = raw_size.strip()
810
if raw_size.endswith("%"):
911
v = float(raw_size[:-1])

0 commit comments

Comments
 (0)