Files
lancedb/pyright_report.csv
msu-reevo cc81f3e1a5 fix(python): typing (#2167)
@wjones127 is there a standard way you guys setup your virtualenv? I can
either relist all the dependencies in the pyright precommit section, or
specify a venv, or the user has to be in the virtual environment when
they run git commit. If the venv location was standardized or a python
manager like `uv` was used it would be easier to avoid duplicating the
pyright dependency list.

Per your suggestion, in `pyproject.toml` I added in all the passing
files to the `includes` section.

For ruff I upgraded the version and removed "TCH" which doesn't exist as
an option.

I added a `pyright_report.csv` which contains a list of all files sorted
by pyright errors ascending as a todo list to work on.

I fixed about 30 issues in `table.py` stemming from str's being passed
into methods that required a string within a set of string Literals by
extracting them into `types.py`

Can you verify in the rust bridge that the schema should be a property
and not a method here? If it's a method, then there's another place in
the code where `inner.schema` should be `inner.schema()`
``` python
class RecordBatchStream:
    @property
    def schema(self) -> pa.Schema: ...
```

Also unless the `_lancedb.pyi` file is wrong, then there is no
`__anext__` here for `__inner` when it's not an `AsyncGenerator` and
only `next` is defined:
``` python
    async def __anext__(self) -> pa.RecordBatch:
        return await self._inner.__anext__()
        if isinstance(self._inner, AsyncGenerator):
            batch = await self._inner.__anext__()
        else:
            batch = await self._inner.next()
        if batch is None:
            raise StopAsyncIteration
        return batch
```
in the else statement, `_inner` is a `RecordBatchStream`
```python
class RecordBatchStream:
    @property
    def schema(self) -> pa.Schema: ...
    async def next(self) -> Optional[pa.RecordBatch]: ...
```

---------

Co-authored-by: Will Jones <willjones127@gmail.com>
2025-03-10 09:01:23 -07:00

2.5 KiB

1fileerrorswarningstotal_issues
2python/python/lancedb/arrow.py000
3python/python/lancedb/background_loop.py000
4python/python/lancedb/embeddings/__init__.py000
5python/python/lancedb/exceptions.py000
6python/python/lancedb/index.py000
7python/python/lancedb/integrations/__init__.py000
8python/python/lancedb/remote/__init__.py000
9python/python/lancedb/remote/errors.py000
10python/python/lancedb/rerankers/__init__.py000
11python/python/lancedb/rerankers/answerdotai.py000
12python/python/lancedb/rerankers/cohere.py000
13python/python/lancedb/rerankers/colbert.py000
14python/python/lancedb/rerankers/cross_encoder.py000
15python/python/lancedb/rerankers/openai.py000
16python/python/lancedb/rerankers/util.py000
17python/python/lancedb/rerankers/voyageai.py000
18python/python/lancedb/schema.py000
19python/python/lancedb/types.py000
20python/python/lancedb/__init__.py011
21python/python/lancedb/conftest.py101
22python/python/lancedb/embeddings/bedrock.py101
23python/python/lancedb/merge.py101
24python/python/lancedb/rerankers/base.py101
25python/python/lancedb/rerankers/jinaai.py011
26python/python/lancedb/rerankers/linear_combination.py101
27python/python/lancedb/embeddings/instructor.py202
28python/python/lancedb/embeddings/openai.py202
29python/python/lancedb/embeddings/watsonx.py202
30python/python/lancedb/embeddings/registry.py303
31python/python/lancedb/embeddings/sentence_transformers.py303
32python/python/lancedb/integrations/pyarrow.py303
33python/python/lancedb/rerankers/rrf.py303
34python/python/lancedb/dependencies.py404
35python/python/lancedb/embeddings/gemini_text.py404
36python/python/lancedb/embeddings/gte.py404
37python/python/lancedb/embeddings/gte_mlx_model.py404
38python/python/lancedb/embeddings/ollama.py404
39python/python/lancedb/embeddings/transformers.py404
40python/python/lancedb/remote/db.py505
41python/python/lancedb/context.py606
42python/python/lancedb/embeddings/cohere.py606
43python/python/lancedb/fts.py606
44python/python/lancedb/db.py909
45python/python/lancedb/embeddings/utils.py909
46python/python/lancedb/common.py11011
47python/python/lancedb/util.py13013
48python/python/lancedb/embeddings/imagebind.py14014
49python/python/lancedb/embeddings/voyageai.py15015
50python/python/lancedb/embeddings/open_clip.py16016
51python/python/lancedb/pydantic.py16016
52python/python/lancedb/embeddings/base.py17017
53python/python/lancedb/embeddings/jinaai.py18119
54python/python/lancedb/remote/table.py23023
55python/python/lancedb/query.py47148
56python/python/lancedb/table.py61061