mirror of
https://github.com/lancedb/lancedb.git
synced 2025-12-22 21:09:58 +00:00
@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>
2.5 KiB
2.5 KiB
| 1 | file | errors | warnings | total_issues |
|---|---|---|---|---|
| 2 | python/python/lancedb/arrow.py | 0 | 0 | 0 |
| 3 | python/python/lancedb/background_loop.py | 0 | 0 | 0 |
| 4 | python/python/lancedb/embeddings/__init__.py | 0 | 0 | 0 |
| 5 | python/python/lancedb/exceptions.py | 0 | 0 | 0 |
| 6 | python/python/lancedb/index.py | 0 | 0 | 0 |
| 7 | python/python/lancedb/integrations/__init__.py | 0 | 0 | 0 |
| 8 | python/python/lancedb/remote/__init__.py | 0 | 0 | 0 |
| 9 | python/python/lancedb/remote/errors.py | 0 | 0 | 0 |
| 10 | python/python/lancedb/rerankers/__init__.py | 0 | 0 | 0 |
| 11 | python/python/lancedb/rerankers/answerdotai.py | 0 | 0 | 0 |
| 12 | python/python/lancedb/rerankers/cohere.py | 0 | 0 | 0 |
| 13 | python/python/lancedb/rerankers/colbert.py | 0 | 0 | 0 |
| 14 | python/python/lancedb/rerankers/cross_encoder.py | 0 | 0 | 0 |
| 15 | python/python/lancedb/rerankers/openai.py | 0 | 0 | 0 |
| 16 | python/python/lancedb/rerankers/util.py | 0 | 0 | 0 |
| 17 | python/python/lancedb/rerankers/voyageai.py | 0 | 0 | 0 |
| 18 | python/python/lancedb/schema.py | 0 | 0 | 0 |
| 19 | python/python/lancedb/types.py | 0 | 0 | 0 |
| 20 | python/python/lancedb/__init__.py | 0 | 1 | 1 |
| 21 | python/python/lancedb/conftest.py | 1 | 0 | 1 |
| 22 | python/python/lancedb/embeddings/bedrock.py | 1 | 0 | 1 |
| 23 | python/python/lancedb/merge.py | 1 | 0 | 1 |
| 24 | python/python/lancedb/rerankers/base.py | 1 | 0 | 1 |
| 25 | python/python/lancedb/rerankers/jinaai.py | 0 | 1 | 1 |
| 26 | python/python/lancedb/rerankers/linear_combination.py | 1 | 0 | 1 |
| 27 | python/python/lancedb/embeddings/instructor.py | 2 | 0 | 2 |
| 28 | python/python/lancedb/embeddings/openai.py | 2 | 0 | 2 |
| 29 | python/python/lancedb/embeddings/watsonx.py | 2 | 0 | 2 |
| 30 | python/python/lancedb/embeddings/registry.py | 3 | 0 | 3 |
| 31 | python/python/lancedb/embeddings/sentence_transformers.py | 3 | 0 | 3 |
| 32 | python/python/lancedb/integrations/pyarrow.py | 3 | 0 | 3 |
| 33 | python/python/lancedb/rerankers/rrf.py | 3 | 0 | 3 |
| 34 | python/python/lancedb/dependencies.py | 4 | 0 | 4 |
| 35 | python/python/lancedb/embeddings/gemini_text.py | 4 | 0 | 4 |
| 36 | python/python/lancedb/embeddings/gte.py | 4 | 0 | 4 |
| 37 | python/python/lancedb/embeddings/gte_mlx_model.py | 4 | 0 | 4 |
| 38 | python/python/lancedb/embeddings/ollama.py | 4 | 0 | 4 |
| 39 | python/python/lancedb/embeddings/transformers.py | 4 | 0 | 4 |
| 40 | python/python/lancedb/remote/db.py | 5 | 0 | 5 |
| 41 | python/python/lancedb/context.py | 6 | 0 | 6 |
| 42 | python/python/lancedb/embeddings/cohere.py | 6 | 0 | 6 |
| 43 | python/python/lancedb/fts.py | 6 | 0 | 6 |
| 44 | python/python/lancedb/db.py | 9 | 0 | 9 |
| 45 | python/python/lancedb/embeddings/utils.py | 9 | 0 | 9 |
| 46 | python/python/lancedb/common.py | 11 | 0 | 11 |
| 47 | python/python/lancedb/util.py | 13 | 0 | 13 |
| 48 | python/python/lancedb/embeddings/imagebind.py | 14 | 0 | 14 |
| 49 | python/python/lancedb/embeddings/voyageai.py | 15 | 0 | 15 |
| 50 | python/python/lancedb/embeddings/open_clip.py | 16 | 0 | 16 |
| 51 | python/python/lancedb/pydantic.py | 16 | 0 | 16 |
| 52 | python/python/lancedb/embeddings/base.py | 17 | 0 | 17 |
| 53 | python/python/lancedb/embeddings/jinaai.py | 18 | 1 | 19 |
| 54 | python/python/lancedb/remote/table.py | 23 | 0 | 23 |
| 55 | python/python/lancedb/query.py | 47 | 1 | 48 |
| 56 | python/python/lancedb/table.py | 61 | 0 | 61 |