mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-02-02 02:51:53 +08:00
new typing style
This commit is contained in:
@@ -23,8 +23,6 @@
|
||||
import os
|
||||
import dataclasses
|
||||
|
||||
from typing import Optional
|
||||
|
||||
from ....logging import get_logger
|
||||
|
||||
|
||||
@@ -44,7 +42,7 @@ def get_file_size(path: str) -> int:
|
||||
return -1
|
||||
|
||||
|
||||
def get_fs_space(path: str, fatal: bool) -> Optional[FsSpace]:
|
||||
def get_fs_space(path: str, fatal: bool) -> (FsSpace | None):
|
||||
try:
|
||||
st = os.statvfs(path)
|
||||
except Exception as err:
|
||||
|
||||
Reference in New Issue
Block a user