mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-29 23:26:54 +08:00
Fix several typos in comments (#6830)
This commit is contained in:
@@ -847,7 +847,7 @@ class dict(MutableMapping[_KT, _VT], Generic[_KT, _VT]):
|
||||
def values(self) -> dict_values[_KT, _VT]: ...
|
||||
def items(self) -> dict_items[_KT, _VT]: ...
|
||||
# Signature of `dict.fromkeys` should be kept identical to `fromkeys` methods of `OrderedDict`/`ChainMap`/`UserDict` in `collections`
|
||||
# TODO: the true signature of `dict.fromkeys` is not expressable in the current type system.
|
||||
# TODO: the true signature of `dict.fromkeys` is not expressible in the current type system.
|
||||
# See #3800 & https://github.com/python/typing/issues/548#issuecomment-683336963.
|
||||
@classmethod
|
||||
@overload
|
||||
|
||||
@@ -56,7 +56,7 @@ class UserDict(MutableMapping[_KT, _VT], Generic[_KT, _VT]):
|
||||
def __contains__(self, key: object) -> bool: ...
|
||||
def copy(self: Self) -> Self: ...
|
||||
# `UserDict.fromkeys` has the same semantics as `dict.fromkeys`, so should be kept in line with `dict.fromkeys`.
|
||||
# TODO: Much like `dict.fromkeys`, the true signature of `UserDict.fromkeys` is inexpressable in the current type system.
|
||||
# TODO: Much like `dict.fromkeys`, the true signature of `UserDict.fromkeys` is inexpressible in the current type system.
|
||||
# See #3800 & https://github.com/python/typing/issues/548#issuecomment-683336963.
|
||||
@classmethod
|
||||
@overload
|
||||
@@ -277,7 +277,7 @@ class OrderedDict(dict[_KT, _VT], Reversible[_KT], Generic[_KT, _VT]):
|
||||
def items(self) -> _OrderedDictItemsView[_KT, _VT]: ...
|
||||
def values(self) -> _OrderedDictValuesView[_KT, _VT]: ...
|
||||
# `fromkeys` is actually inherited from `dict` at runtime, so the signature should be kept in line with `dict.fromkeys`.
|
||||
# Ideally we would not redefine it here, but the true signature of `dict.fromkeys` is not expressable in the current type system.
|
||||
# Ideally we would not redefine it here, but the true signature of `dict.fromkeys` is not expressible in the current type system.
|
||||
# See #3800 & https://github.com/python/typing/issues/548#issuecomment-683336963.
|
||||
@classmethod
|
||||
@overload
|
||||
|
||||
@@ -352,7 +352,7 @@ class stat_result(structseq[float], tuple[int, int, int, int, int, int, int, flo
|
||||
if sys.platform == "darwin":
|
||||
@property
|
||||
def st_flags(self) -> int: ... # user defined flags for file
|
||||
# Atributes documented as sometimes appearing, but deliberately omitted from the stub: `st_creator`, `st_rsize`, `st_type`.
|
||||
# Attributes documented as sometimes appearing, but deliberately omitted from the stub: `st_creator`, `st_rsize`, `st_type`.
|
||||
# See https://github.com/python/typeshed/pull/6560#issuecomment-991253327
|
||||
|
||||
@runtime_checkable
|
||||
|
||||
Reference in New Issue
Block a user