Mypy|Pyright plugin and stubs for assertpy
Project description
assertpy-stubs
Add types for assertpy for mypy or pyright.
Installation
$ pip install assertpy-stubs
Usage
Mypy or pyright will automatically use the type annotations in this package, once it is installed. You just need to annotate your code:
from assertpy import assert_that
def test_something():
assert_that(1 + 2).is_equal_to(3)
assert_that("foobar").is_length(6).starts_with("foo").ends_with("bar")
assert_that(["a", "b", "c"]).contains("a").does_not_contain("x")
For general hints how to use type annotations, please read Type Annotations in Python 3.8
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
assertpy_stubs-1.1.2.tar.gz
(16.1 kB
view details)
Built Distribution
File details
Details for the file assertpy_stubs-1.1.2.tar.gz
.
File metadata
- Download URL: assertpy_stubs-1.1.2.tar.gz
- Upload date:
- Size: 16.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d73f0bb23ab0509801648e3d1f22d3adbc7f0919d92f0838f05f59ace34fd6e |
|
MD5 | d3a0d79a6adaaa301f0c4f6b0bb8e5d2 |
|
BLAKE2b-256 | 6c3b3832442ad7969999a89977efc1cbad44d0eb9159d013735fcc7e90c21742 |
File details
Details for the file assertpy_stubs-1.1.2-py3-none-any.whl
.
File metadata
- Download URL: assertpy_stubs-1.1.2-py3-none-any.whl
- Upload date:
- Size: 22.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3cfff48f5953ab78908d7f899d788ffb1371d50f8d7d7cbea0db17cabd03b6c5 |
|
MD5 | b5bf660737c99b6b2490d4278eb16447 |
|
BLAKE2b-256 | 75b06242328172653f7b6d3dedc520cd41319fdbcb8126494aa6934955bb0a27 |