Skip to content

Commit

Permalink
Fix various typos
Browse files Browse the repository at this point in the history
Found via `codespell -q 3 -L alo,asend,ba,nams,spawnve
`  
Originally found downstream python/mypy#11498 (comment)
  • Loading branch information
luzpaz committed Nov 9, 2021
1 parent 50dff24 commit a298f9b
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion stdlib/@python2/__builtin__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ class type(object):
def __new__(cls, name: str, bases: Tuple[type, ...], namespace: Dict[str, Any]) -> type: ...
def __call__(self, *args: Any, **kwds: Any) -> Any: ...
def __subclasses__(self: _TT) -> List[_TT]: ...
# Note: the documentation doesnt specify what the return type is, the standard
# Note: the documentation doesn't specify what the return type is, the standard
# implementation seems to be returning a list.
def mro(self) -> List[type]: ...
def __instancecheck__(self, instance: Any) -> bool: ...
Expand Down
2 changes: 1 addition & 1 deletion stdlib/@python2/builtins.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ class type(object):
def __new__(cls, name: str, bases: Tuple[type, ...], namespace: Dict[str, Any]) -> type: ...
def __call__(self, *args: Any, **kwds: Any) -> Any: ...
def __subclasses__(self: _TT) -> List[_TT]: ...
# Note: the documentation doesnt specify what the return type is, the standard
# Note: the documentation doesn't specify what the return type is, the standard
# implementation seems to be returning a list.
def mro(self) -> List[type]: ...
def __instancecheck__(self, instance: Any) -> bool: ...
Expand Down
2 changes: 1 addition & 1 deletion stdlib/builtins.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ class type(object):
def __new__(cls: Type[_TT], __name: str, __bases: Tuple[type, ...], __namespace: dict[str, Any], **kwds: Any) -> _TT: ...
def __call__(self, *args: Any, **kwds: Any) -> Any: ...
def __subclasses__(self: _TT) -> list[_TT]: ...
# Note: the documentation doesnt specify what the return type is, the standard
# Note: the documentation doesn't specify what the return type is, the standard
# implementation seems to be returning a list.
def mro(self) -> list[type]: ...
def __instancecheck__(self, __instance: Any) -> bool: ...
Expand Down
2 changes: 1 addition & 1 deletion stdlib/multiprocessing/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ _SemaphoreType = synchronize.Semaphore
# multiprocessing.context.BaseContext's methods, so the two signatures should
# be identical (modulo self).

# Sychronization primitives
# Synchronization primitives
_LockLike = Union[synchronize.Lock, synchronize.RLock]
RawValue = context._default_context.RawValue
RawArray = context._default_context.RawArray
Expand Down
2 changes: 1 addition & 1 deletion stdlib/os/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ class PathLike(Protocol[_AnyStr_co]):
_FdOrAnyPath = Union[int, StrOrBytesPath]

class DirEntry(Generic[AnyStr]):
# This is what the scandir interator yields
# This is what the scandir iterator yields
# The constructor is hidden

name: AnyStr
Expand Down
12 changes: 6 additions & 6 deletions stdlib/tkinter/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ class Misc:
pad: _ScreenUnits = ...,
uniform: str = ...,
weight: int = ...,
) -> _GridIndexInfo | Any: ... # can be None but annoyying to check
) -> _GridIndexInfo | Any: ... # can be None but annoying to check
columnconfigure = grid_columnconfigure
rowconfigure = grid_rowconfigure
def grid_location(self, x: _ScreenUnits, y: _ScreenUnits) -> tuple[int, int]: ...
Expand Down Expand Up @@ -730,7 +730,7 @@ class Pack:
forget = pack_forget
propagate = Misc.pack_propagate
# commented out to avoid mypy getting confused with multiple
# inheritance and how things get overrided with different things
# inheritance and how things get overridden with different things
# info = pack_info
# pack_propagate = Misc.pack_propagate
# configure = pack_configure
Expand Down Expand Up @@ -774,7 +774,7 @@ class Place:
place = place_configure
info = place_info
# commented out to avoid mypy getting confused with multiple
# inheritance and how things get overrided with different things
# inheritance and how things get overridden with different things
# config = place_configure
# configure = place_configure
# forget = place_forget
Expand Down Expand Up @@ -816,7 +816,7 @@ class Grid:
location = Misc.grid_location
size = Misc.grid_size
# commented out to avoid mypy getting confused with multiple
# inheritance and how things get overrided with different things
# inheritance and how things get overridden with different things
# bbox = Misc.grid_bbox
# grid_bbox = Misc.grid_bbox
# forget = grid_forget
Expand Down Expand Up @@ -954,7 +954,7 @@ class Button(Widget):
state: Literal["normal", "active", "disabled"] = ...,
takefocus: _TakeFocusValue = ...,
text: float | str = ...,
# We allow the textvariable to be any Variable, not necessarly
# We allow the textvariable to be any Variable, not necessarily
# StringVar. This is useful for e.g. a button that displays the value
# of an IntVar.
textvariable: Variable = ...,
Expand Down Expand Up @@ -2960,7 +2960,7 @@ class OptionMenu(Menubutton):
command: Callable[[StringVar], Any] | None = ...,
) -> None: ...
# configure, config, cget are inherited from Menubutton
# destroy and __getitem__ are overrided, signature does not change
# destroy and __getitem__ are overridden, signature does not change

class _Image(Protocol):
tk: _tkinter.TkappType
Expand Down
4 changes: 2 additions & 2 deletions stdlib/tkinter/ttk.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -1122,7 +1122,7 @@ class LabeledScale(Frame):
compound: Literal["top"] | Literal["bottom"] = ...,
**kw: Any,
) -> None: ...
# destroy is overrided, signature does not change
# destroy is overridden, signature does not change
value: Any

class OptionMenu(Menubutton):
Expand All @@ -1138,5 +1138,5 @@ class OptionMenu(Menubutton):
command: Callable[[tkinter.StringVar], Any] | None = ...,
) -> None: ...
# configure, config, cget, destroy are inherited from Menubutton
# destroy and __setitem__ are overrided, signature does not change
# destroy and __setitem__ are overridden, signature does not change
def set_menu(self, default: Any | None = ..., *values): ...
2 changes: 1 addition & 1 deletion stubs/Flask/flask/testing.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ from werkzeug.test import Client, EnvironBuilder as WerkzeugEnvironBuilder

# Response type for the client below.
# By default _R is Tuple[Iterable[Any], Text | int, werkzeug.datastructures.Headers], however
# most commonly it is wrapped in a Reponse object.
# most commonly it is wrapped in a Response object.
_R = TypeVar("_R")

class FlaskClient(Client[_R]):
Expand Down
2 changes: 1 addition & 1 deletion stubs/caldav/@tests/stubtest_allowlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ caldav.DAVClient.principal
caldav.davclient.DAVClient.calendar
caldav.davclient.DAVClient.principal

# Initialized in class, but immediatly overwritten in __init__
# Initialized in class, but immediately overwritten in __init__
caldav.DAVClient.url
caldav.davclient.DAVClient.url
caldav.davclient.DAVResponse.headers
Expand Down
4 changes: 2 additions & 2 deletions tests/stubtest_allowlists/py3_common.txt
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ http.client.HTTPConnection.response_class # the actual type at runtime is abc.A
imaplib.IMAP4_SSL.ssl # Dependent on SSL existence
importlib.abc.FileLoader.get_filename # Wrapped with _check_name decorator which changes runtime signature
importlib.abc.FileLoader.load_module # Wrapped with _check_name decorator which changes runtime signature
importlib.abc.Loader.exec_module # See Lib/importlib/_abc.py. Might be defined for backwards compatability
importlib.abc.Loader.exec_module # See Lib/importlib/_abc.py. Might be defined for backwards compatibility
importlib.abc.MetaPathFinder.find_spec # Not defined on the actual class, but expected to exist.
importlib.abc.PathEntryFinder.find_spec # Not defined on the actual class, but expected to exist.
importlib.machinery.ExtensionFileLoader.get_filename # Wrapped with _check_name decorator which changes runtime signature
Expand Down Expand Up @@ -196,7 +196,7 @@ tkinter.Tk.eval # from __getattr__
tkinter.Tk.report_callback_exception # A bit of a lie, since it's actually a method, but typing it as an attribute allows it to be assigned to
tkinter.Wm.wm_iconphoto # Default value of argument can't be used without runtime error
tkinter.font.Font.__getitem__ # Argument name differs (doesn't matter for __dunder__ methods)
traceback.TracebackException.from_exception # explicitly expanding arguemnts going into TracebackException __init__
traceback.TracebackException.from_exception # explicitly expanding arguments going into TracebackException __init__
types.GetSetDescriptorType.__get__ # this function can accept no value for the type parameter.
types.MemberDescriptorType.__get__ # this function can accept no value for the type parameter.
types.SimpleNamespace.__init__ # class doesn't accept positional arguments but has default C signature
Expand Down

0 comments on commit a298f9b

Please sign in to comment.