Skip to main content

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


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.dev0.tar.gz (102.3 kB view details)

Uploaded Source

Built Distribution

types_pydicom-3.0.0.0.dev0-py3-none-any.whl (76.5 kB view details)

Uploaded Python 3

File details

Details for the file types_pydicom-3.0.0.0.dev0.tar.gz.

File metadata

  • Download URL: types_pydicom-3.0.0.0.dev0.tar.gz
  • Upload date:
  • Size: 102.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for types_pydicom-3.0.0.0.dev0.tar.gz
Algorithm Hash digest
SHA256 c656bef5aab08d1ca763b0bdcb5048a69fe052d5b58e743799f7ae1ae0ad762f
MD5 4fba12006c9b363af0603dafde3d5e33
BLAKE2b-256 e8345d7d56946cc7e5b59ef6663a30976b0a2874bd79e486a0cf86ba1f47a9bb

See more details on using hashes here.

File details

Details for the file types_pydicom-3.0.0.0.dev0-py3-none-any.whl.

File metadata

File hashes

Hashes for types_pydicom-3.0.0.0.dev0-py3-none-any.whl
Algorithm Hash digest
SHA256 cc693e257a01f6b1c5c4011c785212a518454d18307f29ac9929e61b8a18e1ca
MD5 6db27f94362457a2d141b81415b125d8
BLAKE2b-256 743bf72519786fa2f4d5bc1cde6499dbe1cf0fb091fbe48743683c0640428953

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page