Skip to content

Commit c52fabf

Browse files
cehilevkivskyi
authored andcommitted
Fix various typos (#5355)
1 parent 1c89afc commit c52fabf

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

docs/source/installed_packages.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ the setup.py might look like:
9999
)
100100
101101
In this example, both ``lib.py`` and ``lib.pyi`` exist. At runtime, the Python
102-
interpeter will use ``lib.py``, but mypy will use ``lib.pyi`` instead.
102+
interpreter will use ``lib.py``, but mypy will use ``lib.pyi`` instead.
103103

104104
If the package is stub-only (not imported at runtime), the package should have
105105
a prefix of the runtime package name and a suffix of ``-stubs``.

docs/source/more_types.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ Here's a quick summary of what's covered here:
1717
just an ``int`` at runtime.
1818

1919
* ``@overload`` lets you define a function that can accept multiple distinct
20-
signatures. This is useful for if you need to encode a relationship between
21-
the arguments and the return type that would be difficult to express normally.
20+
signatures. This is useful if you need to encode a relationship between the
21+
arguments and the return type that would be difficult to express normally.
2222

2323
* ``TypedDict`` lets you give precise types for dictionaries that represent
2424
objects with a fixed schema, such as ``{'id': 1, 'items': ['x']}``.
@@ -474,7 +474,7 @@ the following unsafe overload definition:
474474
return "some string"
475475
476476
On the surface, this function definition appears to be fine. However, it will
477-
result in a discrepency between the inferred type and the actual runtime type
477+
result in a discrepancy between the inferred type and the actual runtime type
478478
when we try using it like so:
479479

480480
.. code-block:: python

mypy/build.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ def default_flush_errors(new_messages: List[str], is_serious: bool) -> None:
188188
raise
189189

190190

191-
# python_path is usercode, mypy_path is set via config or envionment variable,
191+
# python_path is usercode, mypy_path is set via config or environment variable,
192192
# package_path is calculated by _get_site_packages_dirs, and typeshed_path points
193193
# to typeshed. Each is a tuple of paths to be searched in find_module()
194194
SearchPaths = NamedTuple('SearchPaths',
@@ -508,7 +508,7 @@ def cache_meta_from_dict(meta: Dict[str, Any],
508508
Args:
509509
meta: JSON metadata read from the metadata cache file
510510
data_json: Path to the .data.json file containing the AST trees
511-
deps_json: Optionally, path to the .deps.json file containign
511+
deps_json: Optionally, path to the .deps.json file containing
512512
fine-grained dependency information.
513513
"""
514514
sentinel = None # type: Any # Values to be validated by the caller
@@ -2766,7 +2766,7 @@ def process_graph(graph: Graph, manager: BuildManager) -> None:
27662766
undeps = set()
27672767
if fresh:
27682768
# Check if any dependencies that were suppressed according
2769-
# to the cache have heen added back in this run.
2769+
# to the cache have been added back in this run.
27702770
# NOTE: Newly suppressed dependencies are handled by is_fresh().
27712771
for id in scc:
27722772
undeps.update(graph[id].suppressed)

mypy/checker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2904,7 +2904,7 @@ def partition_by_callable(self, typ: Type,
29042904
if isinstance(typ, TypeVarType):
29052905
# We could do better probably?
29062906
# Refine the the type variable's bound as our type in the case that
2907-
# callable() is true. This unfortuantely loses the information that
2907+
# callable() is true. This unfortunately loses the information that
29082908
# the type is a type variable in that branch.
29092909
# This matches what is done for isinstance, but it may be possible to
29102910
# do better.

0 commit comments

Comments
 (0)