Metadata-Version: 2.4
Name: slingshot-types
Version: 0.1.5
Summary: Typed Protocol+cast shims for common Python data science package functions
Author: Seán Healy
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: scikit-learn>=1.8.0
Requires-Dist: sentence-transformers>=5.5.1
Requires-Dist: tqdm>=4.67.3

# slingshot-types

Typed shims for popular Python package functions that often show up as `Unknown` in strict type checking.

The package uses `Protocol` and `cast` to provide stable, importable typed callables for:

- `sklearn.metrics.classification_report`
- `sklearn.model_selection.train_test_split`
- `tqdm.tqdm`

## Install

```bash
pip install -e .
```

## Usage

```python
from slingshot_types import classification_report, train_test_split, tqdm

X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2)

for row in tqdm(rows):
    ...

report = classification_report(y_test, y_pred)
```

## Why this exists

Some downstream codebases run strict checks (`Unknown`/`Any` bans in pyright or mypy configurations).
These shims give typed import points while preserving runtime behavior.
