mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 04:34:28 +08:00
Make os.statvfs_result inherit from typing.NamedTuple. (#3603)
This commit is contained in:
committed by
Sebastian Rittau
parent
b25454a76c
commit
3b3fc6a57f
@@ -1,4 +1,4 @@
|
||||
from typing import AnyStr, Dict, List, Mapping, Tuple, Union, Sequence, IO, Optional, TypeVar
|
||||
from typing import AnyStr, Dict, IO, List, Mapping, NamedTuple, Optional, Sequence, Tuple, TypeVar, Union
|
||||
|
||||
error = OSError
|
||||
|
||||
@@ -78,10 +78,7 @@ class stat_result(object):
|
||||
st_mtime: int
|
||||
st_ctime: int
|
||||
|
||||
class statvfs_result(object):
|
||||
n_fields: int
|
||||
n_sequence_fields: int
|
||||
n_unnamed_fields: int
|
||||
class statvfs_result(NamedTuple):
|
||||
f_bsize: int
|
||||
f_frsize: int
|
||||
f_blocks: int
|
||||
|
||||
@@ -270,7 +270,7 @@ else:
|
||||
|
||||
|
||||
if sys.platform != 'win32':
|
||||
class statvfs_result: # Unix only
|
||||
class statvfs_result(NamedTuple): # Unix only
|
||||
f_bsize: int
|
||||
f_frsize: int
|
||||
f_blocks: int
|
||||
|
||||
Reference in New Issue
Block a user