Typed Protocol+cast shims for common Python data science package functions
Project description
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_reportsklearn.model_selection.train_test_splittqdm.tqdm
Install
pip install -e .
Usage
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.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file slingshot_types-0.1.1.tar.gz.
File metadata
- Download URL: slingshot_types-0.1.1.tar.gz
- Upload date:
- Size: 2.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9fa43cbfcfb9c49fe3aa9d7a3a17654ced18633d25b074bcc547f9642103af11
|
|
| MD5 |
8aa4db3bfdc537c13bd04682872757c7
|
|
| BLAKE2b-256 |
0e2a37180eef7ce08b4560343c7a9f14b602ebddc4c3c70f40403593003fcdb8
|
File details
Details for the file slingshot_types-0.1.1-py3-none-any.whl.
File metadata
- Download URL: slingshot_types-0.1.1-py3-none-any.whl
- Upload date:
- Size: 3.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cc390b24a1a4fefcce51e6ceae636b5948bef64d149634b65b6f3a6e566e82a7
|
|
| MD5 |
bc0f6bec610d893153bb671b6183714f
|
|
| BLAKE2b-256 |
2eaf7c8d836d66cd377affc2dbcbb20ac23ffcd638cb522eb01baeae6047a170
|