Skip to content

Commit 739f074

Browse files
alexfiklinducer
authored andcommitted
enable typos and fix errors
1 parent a85cbb3 commit 739f074

File tree

7 files changed

+18
-5
lines changed

7 files changed

+18
-5
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@ on:
88
- cron: '17 3 * * 0'
99

1010
jobs:
11+
typos:
12+
name: Typos
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: crate-ci/typos@master
17+
1118
ruff:
1219
name: Ruff
1320
runs-on: ubuntu-latest

arraycontext/impl/jax/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ def tag(self, tags: ToTagSetConvertible, array):
151151
return array
152152

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

157157
def call_loopy(self, t_unit, **kwargs):

arraycontext/impl/jax/fake_numpy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ def rec_equal(x, y):
174174
else:
175175
return reduce(
176176
jnp.logical_and,
177-
[rec_equal(ix, iy) for (_, ix), (_, iy) in iterable],
177+
[rec_equal(x_i, y_i) for (_, x_i), (_, y_i) in iterable],
178178
true)
179179

180180
return rec_equal(a, b)

arraycontext/impl/pyopencl/fake_numpy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ def rec_equal(x, y):
231231
else:
232232
return reduce(
233233
partial(cl_array.minimum, queue=queue),
234-
[rec_equal(ix, iy)for (_, ix), (_, iy) in iterable],
234+
[rec_equal(x_i, y_i)for (_, x_i), (_, y_i) in iterable],
235235
true)
236236

237237
result = rec_equal(a, b)

arraycontext/impl/pyopencl/taggable_cl_array.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@
2020
@dataclass(frozen=True, eq=True)
2121
class Axis(Taggable):
2222
"""
23-
Records the tags corresponding to a dimensions of :class:`TaggableCLArray`.
23+
Records the tags corresponding to a dimension of :class:`TaggableCLArray`.
2424
"""
25+
2526
tags: FrozenSet[Tag]
2627

2728
def _with_new_tags(self, tags: FrozenSet[Tag]) -> "Axis":

arraycontext/impl/pytato/fake_numpy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ def rec_equal(x, y):
189189
else:
190190
return reduce(
191191
pt.logical_and,
192-
[rec_equal(ix, iy) for (_, ix), (_, iy) in iterable],
192+
[rec_equal(x_i, y_i) for (_, x_i), (_, y_i) in iterable],
193193
true)
194194

195195
return rec_equal(a, b)

pyproject.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,3 +135,8 @@ module = [
135135
"jax.*",
136136
]
137137
ignore_missing_imports = true
138+
139+
[tool.typos.default]
140+
extend-ignore-re = [
141+
"(?Rm)^.*(#|//)\\s*spellchecker:\\s*disable-line$"
142+
]

0 commit comments

Comments
 (0)