Last updated:
0 purchases
assertpystubs 1.1.2
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
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.