From 1d2ae2598b3891266b0072431c0eb7d53f167396 Mon Sep 17 00:00:00 2001 From: Alex Waygood Date: Thu, 23 Feb 2023 22:11:24 +0000 Subject: [PATCH] Fix some typos in comments (#9802) --- scripts/stubsabot.py | 2 +- stdlib/_typeshed/__init__.pyi | 2 +- stdlib/socketserver.pyi | 2 +- stdlib/tkinter/__init__.pyi | 2 +- stubs/pyinstaller/PyInstaller/depend/analysis.pyi | 2 +- stubs/python-xlib/@tests/stubtest_allowlist.txt | 4 ++-- stubs/tensorflow/@tests/stubtest_allowlist.txt | 2 +- tests/regr_test.py | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/scripts/stubsabot.py b/scripts/stubsabot.py index 31b02e067..a82514020 100644 --- a/scripts/stubsabot.py +++ b/scripts/stubsabot.py @@ -581,7 +581,7 @@ def get_update_pr_body(update: Update, metadata: dict[str, Any]) -> str: if update.diff_analysis is not None: body += f"\n\n{update.diff_analysis}" - # Loss of type due to infered [dict[Unknown, Unknown]] + # Loss of type due to inferred [dict[Unknown, Unknown]] # scripts/stubsabot.py can't import tests/parse_metadata stubtest_will_run = ( not metadata.get("tool", {}).get("stubtest", {}).get("skip", False) # pyright: ignore[reportUnknownMemberType] diff --git a/stdlib/_typeshed/__init__.pyi b/stdlib/_typeshed/__init__.pyi index d0c6b3ab1..3c29032b6 100644 --- a/stdlib/_typeshed/__init__.pyi +++ b/stdlib/_typeshed/__init__.pyi @@ -293,7 +293,7 @@ class structseq(Generic[_T_co]): # https://github.com/python/typeshed/pull/6560#discussion_r767149830 def __new__(cls: type[Self], sequence: Iterable[_T_co], dict: dict[str, Any] = ...) -> Self: ... -# Superset of typing.AnyStr that also inclues LiteralString +# Superset of typing.AnyStr that also includes LiteralString AnyOrLiteralStr = TypeVar("AnyOrLiteralStr", str, bytes, LiteralString) # noqa: Y001 # Represents when str or LiteralStr is acceptable. Useful for string processing diff --git a/stdlib/socketserver.pyi b/stdlib/socketserver.pyi index d04005643..3799d82a0 100644 --- a/stdlib/socketserver.pyi +++ b/stdlib/socketserver.pyi @@ -30,7 +30,7 @@ if sys.platform != "win32": ] _RequestType: TypeAlias = _socket | tuple[bytes, _socket] -_AfUnixAddress: TypeAlias = str | ReadableBuffer # adddress acceptable for an AF_UNIX socket +_AfUnixAddress: TypeAlias = str | ReadableBuffer # address acceptable for an AF_UNIX socket _AfInetAddress: TypeAlias = tuple[str | bytes | bytearray, int] # address acceptable for an AF_INET socket # This can possibly be generic at some point: diff --git a/stdlib/tkinter/__init__.pyi b/stdlib/tkinter/__init__.pyi index 9dc13c809..7b4b06be4 100644 --- a/stdlib/tkinter/__init__.pyi +++ b/stdlib/tkinter/__init__.pyi @@ -3207,7 +3207,7 @@ class OptionMenu(Menubutton): # destroy and __getitem__ are overridden, signature does not change # Marker to indicate that it is a valid bitmap/photo image. PIL implements compatible versions -# which don't share a class hierachy. The actual API is a __str__() which returns a valid name, +# which don't share a class hierarchy. The actual API is a __str__() which returns a valid name, # not something that type checkers can detect. @type_check_only class _Image: ... diff --git a/stubs/pyinstaller/PyInstaller/depend/analysis.pyi b/stubs/pyinstaller/PyInstaller/depend/analysis.pyi index 9c7f79666..84a0ec466 100644 --- a/stubs/pyinstaller/PyInstaller/depend/analysis.pyi +++ b/stubs/pyinstaller/PyInstaller/depend/analysis.pyi @@ -1,6 +1,6 @@ # https://pyinstaller.org/en/stable/hooks.html#the-pre-safe-import-module-psim-api-method -# The documentation explicitely mentions that "Normally you do not need to know about the module-graph." +# The documentation explicitly mentions that "Normally you do not need to know about the module-graph." # However, some PyiModuleGraph typed class attributes are still documented as existing in imphookapi. from _typeshed import Incomplete, StrPath, SupportsKeysAndGetItem from collections.abc import Iterable diff --git a/stubs/python-xlib/@tests/stubtest_allowlist.txt b/stubs/python-xlib/@tests/stubtest_allowlist.txt index 6bc560550..75b175ff6 100644 --- a/stubs/python-xlib/@tests/stubtest_allowlist.txt +++ b/stubs/python-xlib/@tests/stubtest_allowlist.txt @@ -12,9 +12,9 @@ Xlib.protocol.rq.DictWrapper.__lt__ Xlib.protocol.rq.Event.__gt__ Xlib.protocol.rq.Event.__lt__ -# Can be None or str once instanciated +# Can be None or str once instantiated Xlib.protocol.rq.*.structcode -# Should only ever be str once instanciated +# Should only ever be str once instantiated Xlib.protocol.rq.*.name # Structs generate their attributes (@type_check_only) diff --git a/stubs/tensorflow/@tests/stubtest_allowlist.txt b/stubs/tensorflow/@tests/stubtest_allowlist.txt index e42fc68f1..f6941d50d 100644 --- a/stubs/tensorflow/@tests/stubtest_allowlist.txt +++ b/stubs/tensorflow/@tests/stubtest_allowlist.txt @@ -1,7 +1,7 @@ # Some methods are dynamically patched onto to instances as they # may depend on whether code is executed in graph/eager/v1/v2/etc. # Tensorflow supports multiple modes of execution which changes some -# of the attributes/methods/even class hierachies. +# of the attributes/methods/even class hierarchies. tensorflow.Tensor.__int__ tensorflow.Tensor.numpy tensorflow.Tensor.__index__ diff --git a/tests/regr_test.py b/tests/regr_test.py index 8e9d94294..bbb3d0e44 100644 --- a/tests/regr_test.py +++ b/tests/regr_test.py @@ -160,7 +160,7 @@ def run_testcases( if not testcasedir_already_setup: setup_testcase_dir(package, tempdir=tempdir, new_test_case_dir=new_test_case_dir, verbosity=verbosity) - # "--enable-error-code ignore-without-code" is purposefully ommited. + # "--enable-error-code ignore-without-code" is purposefully omitted. # See https://github.com/python/typeshed/pull/8083 flags = [ "--python-version",