Skip to content

Commit

Permalink
enable typos and fix errors
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfikl authored and inducer committed Jul 29, 2024
1 parent a85cbb3 commit 739f074
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 5 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ on:
- cron: '17 3 * * 0'

jobs:
typos:
name: Typos
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: crate-ci/typos@master

ruff:
name: Ruff
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion arraycontext/impl/jax/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def tag(self, tags: ToTagSetConvertible, array):
return array

def tag_axis(self, iaxis, tags: ToTagSetConvertible, array):
# TODO: See `jax.experiemental.maps.xmap`, proabably that should be useful?
# TODO: See `jax.experiemental.maps.xmap`, probably that should be useful?
return array

def call_loopy(self, t_unit, **kwargs):
Expand Down
2 changes: 1 addition & 1 deletion arraycontext/impl/jax/fake_numpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ def rec_equal(x, y):
else:
return reduce(
jnp.logical_and,
[rec_equal(ix, iy) for (_, ix), (_, iy) in iterable],
[rec_equal(x_i, y_i) for (_, x_i), (_, y_i) in iterable],
true)

return rec_equal(a, b)
Expand Down
2 changes: 1 addition & 1 deletion arraycontext/impl/pyopencl/fake_numpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ def rec_equal(x, y):
else:
return reduce(
partial(cl_array.minimum, queue=queue),
[rec_equal(ix, iy)for (_, ix), (_, iy) in iterable],
[rec_equal(x_i, y_i)for (_, x_i), (_, y_i) in iterable],
true)

result = rec_equal(a, b)
Expand Down
3 changes: 2 additions & 1 deletion arraycontext/impl/pyopencl/taggable_cl_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@
@dataclass(frozen=True, eq=True)
class Axis(Taggable):
"""
Records the tags corresponding to a dimensions of :class:`TaggableCLArray`.
Records the tags corresponding to a dimension of :class:`TaggableCLArray`.
"""

tags: FrozenSet[Tag]

def _with_new_tags(self, tags: FrozenSet[Tag]) -> "Axis":
Expand Down
2 changes: 1 addition & 1 deletion arraycontext/impl/pytato/fake_numpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def rec_equal(x, y):
else:
return reduce(
pt.logical_and,
[rec_equal(ix, iy) for (_, ix), (_, iy) in iterable],
[rec_equal(x_i, y_i) for (_, x_i), (_, y_i) in iterable],
true)

return rec_equal(a, b)
Expand Down
5 changes: 5 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -135,3 +135,8 @@ module = [
"jax.*",
]
ignore_missing_imports = true

[tool.typos.default]
extend-ignore-re = [
"(?Rm)^.*(#|//)\\s*spellchecker:\\s*disable-line$"
]

0 comments on commit 739f074

Please sign in to comment.