Extended type hints for pydicom
Project description
types-pydicom
Extended type hints for pydicom's Dataset element keywords.
Installation
$ pip install types-pydicom
Usage
# test_typing.py
from pydicom import Dataset
ds = Dataset()
ds.SamplesPerPixel = "abc"
reveal_type(ds.PixelData)
$ pip install pydicom types-pydicom mypy
$ mypy test_typing.py
test_typing.py:5: error: Incompatible types in assignment (expression has type "str", variable has type "int") [assignment]
test_typing.py:6: note: Revealed type is "Union[None, builtins.bytes]"
Found 1 errors in 1 file (checked 1 source file)
Development
git clone https://github.com/pydicom
git clone https://github.com/pydicom/types-pydicom
cd types-pydicom
mkdir env
python3.10 -m venv env/env310
source env/env310/bin/activate
pip install -e .[dev]
Updating
python scripts/update_package.py
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
types_pydicom-3.0.0.0.tar.gz
(105.0 kB
view details)
Built Distribution
File details
Details for the file types_pydicom-3.0.0.0.tar.gz
.
File metadata
- Download URL: types_pydicom-3.0.0.0.tar.gz
- Upload date:
- Size: 105.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e44380c899e22842cb300ba13aa28623bacef5ac078f2d613691885360c6bc0 |
|
MD5 | 48374f16d063d382a7f7d8f5c92ebb46 |
|
BLAKE2b-256 | c14953dfeb7991d218020244ec9876fbd904c43cbd03d4b475dfbf96f55c5aac |
File details
Details for the file types_pydicom-3.0.0.0-py3-none-any.whl
.
File metadata
- Download URL: types_pydicom-3.0.0.0-py3-none-any.whl
- Upload date:
- Size: 78.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 03634ecaf30765606ab0abdee9e743076f76bdb69bbca8712626996b4c29c2e8 |
|
MD5 | 731375ec1a566ad5b31b0fb7d6ac2230 |
|
BLAKE2b-256 | a254a964eaa9b1308884dd3140b1ea2cda14c5519b89cdc94e39e8f40395bbbc |