Make more miscellaneous fields read-only, annotate _json.make_encoder (#7439)

This commit is contained in:
Alex Waygood
2022-03-06 23:41:49 +00:00
committed by GitHub
parent 6cdecae6f9
commit bc72b25a2a
7 changed files with 63 additions and 31 deletions

View File

@@ -387,8 +387,10 @@ class DirEntry(Generic[AnyStr]):
# This is what the scandir iterator yields
# The constructor is hidden
name: AnyStr
path: AnyStr
@property
def name(self) -> AnyStr: ...
@property
def path(self) -> AnyStr: ...
def inode(self) -> int: ...
def is_dir(self, *, follow_symlinks: bool = ...) -> bool: ...
def is_file(self, *, follow_symlinks: bool = ...) -> bool: ...