Skip to content

Commit b37eaca

Browse files
committed
Update linter.
1 parent 2bb42fa commit b37eaca

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

lupyne/engine/documents.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import datetime
44
import operator
55
from collections.abc import Callable, Iterator, Sequence
6-
from typing import Self
6+
from typing import Self, no_type_check
77

88
import lucene
99
from java.lang import Long
@@ -104,6 +104,7 @@ def settings(self) -> dict:
104104
result[name] = value if isinstance(value, int) else str(value)
105105
return result
106106

107+
@no_type_check
107108
def items(self, *values) -> Iterator[document.Field]:
108109
"""Generate lucene Fields suitable for adding to a document."""
109110
if self.docvalues:
@@ -404,6 +405,7 @@ def docvalues(self, field: str, type=None) -> dict:
404405
"""Return mapping of docs to docvalues."""
405406
return self.searcher.docvalues(field, type).select(self.ids)
406407

408+
@no_type_check
407409
def groupby(
408410
self, func: Callable, count: int | None = None, docs: int | None = None
409411
) -> "Groups":
@@ -418,9 +420,9 @@ def groupby(
418420
group = groups[value]
419421
except KeyError:
420422
group = groups[value] = type(self)(self.searcher, [], fields=self.fields)
421-
group.value = value # type: ignore
423+
group.value = value
422424
group.scoredocs.append(scoredoc)
423-
groups = list(groups.values()) # type: ignore
425+
groups = list(groups.values())
424426
for group in groups:
425427
group.count = len(group)
426428
group.scoredocs = group.scoredocs[:docs]

pyproject.toml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,12 @@ graphql = ["strawberry-graphql[asgi]>=0.221"]
3838
line-length = 100
3939

4040
[tool.ruff.lint]
41-
select = ["I"]
41+
extend-select = ["I"]
4242

4343
[tool.ruff.lint.per-file-ignores]
44-
"lupyne/engine/__init__.py" = ["F401"]
44+
"__init__.py" = ["F401"]
4545

4646
[tool.ty.rules]
47-
unused-ignore-comment = "error"
48-
possibly-missing-attribute = "ignore"
4947
unresolved-import = "ignore"
5048

5149
[tool.pytest.ini_options]

0 commit comments

Comments
 (0)