Skip to content

Commit

Permalink
Fix various typos (#740)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexWaygood authored Mar 6, 2024
1 parent bfbc445 commit 972a5d9
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ for details.

Sometimes pyanalyze gets things wrong and you need to ignore an error it emits. This can be done as follows:

- Add `# static analysis: ignore` on a line by itself before the line that generates the erorr.
- Add `# static analysis: ignore` on a line by itself before the line that generates the error.
- Add `# static analysis: ignore` at the end of the line that generates the error.
- Add `# static analysis: ignore` at the top of the file; this will ignore errors in the entire file.

Expand Down
2 changes: 1 addition & 1 deletion docs/type_evaluation.md
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@ ways:
so that users have time to adapt before the runtime code
is broken.

As an example, this is the current implemenation of `sum()`
As an example, this is the current implementation of `sum()`
in typeshed:

if sys.version_info >= (3, 8):
Expand Down
2 changes: 1 addition & 1 deletion pyanalyze/analysis_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def files_with_extension_from_directory(


def get_indentation(line: str) -> int:
"""Returns the indendation of a line of code."""
"""Returns the indentation of a line of code."""
if len(line.lstrip()) == 0:
# if it is a newline or a line with just spaces
return 0
Expand Down
4 changes: 2 additions & 2 deletions pyanalyze/name_check_visitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@ def __init__(
) -> None:
self.options = options
# we might not have examined all parent classes when looking for attributes set
# we dump them here. incase the callers want to extend coverage.
# we dump them here. in case the callers want to extend coverage.
self.unexamined_base_classes = set()
self.modules_examined = set()
self.enabled = enabled
Expand Down Expand Up @@ -3117,7 +3117,7 @@ def _visit_single_formatted_value(
return TypedValue(str)
if unsupported_conversion:
raise NotImplementedError(
f"Unsupported converion specifier {node.conversion}"
f"Unsupported conversion specifier {node.conversion}"
)
try:
output = format(output, format_spec)
Expand Down
2 changes: 1 addition & 1 deletion pyanalyze/value.py
Original file line number Diff line number Diff line change
Expand Up @@ -865,7 +865,7 @@ def can_assign(self, other: Value, ctx: CanAssignContext) -> CanAssign:
if self.newtype is other.newtype:
return {}
return CanAssignError(f"NewTypes {self} and {other} are not compatible")
# Alow e.g. int for a NewType over int, but not a subtype of int such as an
# Allow e.g. int for a NewType over int, but not a subtype of int such as an
# IntEnum
elif isinstance(other, TypedValue):
if self.typ is not other.typ:
Expand Down

0 comments on commit 972a5d9

Please sign in to comment.