Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos. #179

Merged
merged 2 commits into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions compiler/util/ir_data_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ def _field_specs(cls: type[IrDataT]) -> Mapping[str, FieldSpec]:

# Pre-python 3.11 (maybe pre 3.10) `get_type_hints` will substitute
# `builtins.Expression` for 'Expression' rather than `ir_data.Expression`.
# Instead we manually subsitute the type by extracting the list of classes
# Instead we manually substitute the type by extracting the list of classes
# from the class' module and manually substituting.
mod_ns = {
k: v
Expand Down Expand Up @@ -291,7 +291,7 @@ def _field_specs(cls: type[IrDataT]) -> Mapping[str, FieldSpec]:


def field_specs(obj: Union[IrDataT, type[IrDataT]]) -> Mapping[str, FieldSpec]:
"""Retrieves the fields specs for the the give data type.
"""Retrieves the fields specs for the give data type.

The results of this method are cached to reduce lookup overhead.

Expand Down Expand Up @@ -339,7 +339,7 @@ def fields_and_values(
# `all_field_specs` dict.
# 3. Copied lists are wrapped in a `TemporaryCopyValuesList`. This is used to
# signal to consumers that they can take ownership of the contained list
# rather than copying it again. See `ir_data.Message()` and `udpate()` for
# rather than copying it again. See `ir_data.Message()` and `update()` for
# where this is used.
# 4. `FieldSpec` checks are cached including `is_dataclass` and `is_sequence`.
# 5. None checks are only done in `copy()`, `_copy_set_fields` only
Expand Down
2 changes: 1 addition & 1 deletion compiler/util/ir_data_fields_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class OneofFieldTest(ir_data.Message):


class OneOfTest(unittest.TestCase):
"""Tests for the the various oneof field helpers."""
"""Tests for the various oneof field helpers."""

def test_field_attribute(self):
"""Test the `oneof_field` helper."""
Expand Down
5 changes: 3 additions & 2 deletions compiler/util/traverse_ir.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ class _FunctionCaller:
"""Provides a template for setting up a generic call to a function.

The function parameters are inspected at run-time to build up a set of valid
and required arguments. When invoking the function unneccessary parameters
will be trimmed out. If arguments are missing an assertion will be triggered.
and required arguments. When invoking the function unnecessary parameters
will be trimmed out. If arguments are missing an assertion will be
triggered.

This is currently limited to functions that have at least one positional
parameter.
Expand Down
2 changes: 1 addition & 1 deletion testdata/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ emboss_cc_library(
srcs = [
"enum.emb",
],
# This tag is arbitrary, and exists to ensure you can pass atributes common
# This tag is arbitrary, and exists to ensure you can pass attributes common
# to all build rules to the underlying rules.
tags = ["an_arbitrary_tag"],
)
Expand Down