Skip to content

Commit f9002f4

Browse files
author
David Euresti
committed
Code Review fixes
1 parent 84e7d68 commit f9002f4

File tree

2 files changed

+46
-46
lines changed

2 files changed

+46
-46
lines changed

stdlib/2/os/__init__.pyi

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -97,16 +97,16 @@ TMP_MAX = 0 # Undocumented, but used by tempfile
9797
_PathType = Union[bytes, Text]
9898

9999
class stat_result(NamedTuple('stat_result', [
100-
('st_mode', int), # protection bits,
101-
('st_ino', int), # inode number,
102-
('st_dev', int), # device,
103-
('st_nlink', int), # number of hard links,
104-
('st_uid', int), # user id of owner,
105-
('st_gid', int), # group id of owner,
106-
('st_size', int), # size of file, in bytes,
107-
('st_atime', float), # time of most recent access,
108-
('st_mtime', float), # time of most recent content modification,
109-
('st_ctime', float)])): # platform dependent (time of most recent metadata change on Unix, or the time of creation on Windows)
100+
('st_mode', int),
101+
('st_ino', int),
102+
('st_dev', int),
103+
('st_nlink', int),
104+
('st_uid', int),
105+
('st_gid', int),
106+
('st_size', int),
107+
('st_atime', float),
108+
('st_mtime', float),
109+
('st_ctime', float)])):
110110

111111
# For backward compatibility, the return value of stat() is also
112112
# accessible as a tuple of at least 10 integers giving the most important
@@ -115,26 +115,26 @@ class stat_result(NamedTuple('stat_result', [
115115
# st_ctime. More items may be added at the end by some implementations.
116116

117117
if sys.version_info >= (3, 3):
118-
st_atime_ns = 0 # time of most recent access, in nanoseconds
119-
st_mtime_ns = 0 # time of most recent content modification in nanoseconds
120-
st_ctime_ns = 0 # platform dependent (time of most recent metadata change on Unix, or the time of creation on Windows) in nanoseconds
118+
st_atime_ns = ... # type: int
119+
st_mtime_ns = ... # type: int
120+
st_ctime_ns = ... # type: int
121121

122122
# On some Unix systems (such as Linux), the following attributes may also
123123
# be available:
124-
st_blocks = 0 # number of blocks allocated for file
125-
st_blksize = 0 # filesystem blocksize
126-
st_rdev = 0 # type of device if an inode device
127-
st_flags = 0 # user defined flags for file
124+
st_blocks = ... # type: int
125+
st_blksize = ... # type: int
126+
st_rdev = ... # type: int
127+
st_flags = ... # type: int
128128

129129
# On other Unix systems (such as FreeBSD), the following attributes may be
130130
# available (but may be only filled out if root tries to use them):
131-
st_gen = 0 # file generation number
132-
st_birthtime = 0 # time of file creation
131+
st_gen = ... # type: int
132+
st_birthtime = ... # type: int
133133

134134
# On Mac OS systems, the following attributes may also be available:
135-
st_rsize = 0
136-
st_creator = 0
137-
st_type = 0
135+
st_rsize = ... # type: int
136+
st_creator = ... # type: int
137+
st_type = ... # type: int
138138

139139
statvfs_result = NamedTuple('statvfs_result', [
140140
('f_bsize', int),
@@ -233,7 +233,7 @@ def rename(src: _PathType, dst: _PathType) -> None: ...
233233
def renames(old: _PathType, new: _PathType) -> None: ...
234234
def rmdir(path: _PathType) -> None: ...
235235
@overload
236-
def stat_float_times(newvalue: bool = ...) -> None: ...
236+
def stat_float_times(newvalue: bool) -> None: ...
237237
@overload
238238
def stat_float_times() -> bool: ...
239239
def stat(path: _PathType) -> stat_result: ...

stdlib/3/os/__init__.pyi

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -146,16 +146,16 @@ elif sys.version_info >= (3, 5):
146146
def stat(self) -> stat_result: ...
147147

148148
class stat_result(NamedTuple('stat_result', [
149-
('st_mode', int), # protection bits,
150-
('st_ino', int), # inode number,
151-
('st_dev', int), # device,
152-
('st_nlink', int), # number of hard links,
153-
('st_uid', int), # user id of owner,
154-
('st_gid', int), # group id of owner,
155-
('st_size', int), # size of file, in bytes,
156-
('st_atime', float), # time of most recent access,
157-
('st_mtime', float), # time of most recent content modification,
158-
('st_ctime', float)])): # platform dependent (time of most recent metadata change on Unix, or the time of creation on Windows)
149+
('st_mode', int),
150+
('st_ino', int),
151+
('st_dev', int),
152+
('st_nlink', int),
153+
('st_uid', int),
154+
('st_gid', int),
155+
('st_size', int),
156+
('st_atime', float),
157+
('st_mtime', float),
158+
('st_ctime', float)])):
159159

160160
# For backward compatibility, the return value of stat() is also
161161
# accessible as a tuple of at least 10 integers giving the most important
@@ -164,26 +164,26 @@ class stat_result(NamedTuple('stat_result', [
164164
# st_ctime. More items may be added at the end by some implementations.
165165

166166
if sys.version_info >= (3, 3):
167-
st_atime_ns = 0 # time of most recent access, in nanoseconds
168-
st_mtime_ns = 0 # time of most recent content modification in nanoseconds
169-
st_ctime_ns = 0 # platform dependent (time of most recent metadata change on Unix, or the time of creation on Windows) in nanoseconds
167+
st_atime_ns = ... # type: int
168+
st_mtime_ns = ... # type: int
169+
st_ctime_ns = ... # type: int
170170

171171
# On some Unix systems (such as Linux), the following attributes may also
172172
# be available:
173-
st_blocks = 0 # number of blocks allocated for file
174-
st_blksize = 0 # filesystem blocksize
175-
st_rdev = 0 # type of device if an inode device
176-
st_flags = 0 # user defined flags for file
173+
st_blocks = ... # type: int
174+
st_blksize = ... # type: int
175+
st_rdev = ... # type: int
176+
st_flags = ... # type: int
177177

178178
# On other Unix systems (such as FreeBSD), the following attributes may be
179179
# available (but may be only filled out if root tries to use them):
180-
st_gen = 0 # file generation number
181-
st_birthtime = 0 # time of file creation
180+
st_gen = ... # type: int
181+
st_birthtime = ... # type: int
182182

183183
# On Mac OS systems, the following attributes may also be available:
184-
st_rsize = 0
185-
st_creator = 0
186-
st_type = 0
184+
st_rsize = ... # type: int
185+
st_creator = ... # type: int
186+
st_type = ... # type: int
187187

188188
statvfs_result = NamedTuple('statvfs_result', [
189189
('f_bsize', int),
@@ -322,7 +322,7 @@ if sys.version_info >= (3, 5):
322322
@overload
323323
def scandir(path: bytes) -> Iterator[DirEntry[bytes]]: ...
324324
@overload
325-
def stat_float_times(newvalue: bool = ...) -> None: ...
325+
def stat_float_times(newvalue: bool) -> None: ...
326326
@overload
327327
def stat_float_times() -> bool: ...
328328
def stat(path: _PathType) -> stat_result: ...

0 commit comments

Comments
 (0)