Skip to main content

Mypy|Pyright plugin and stubs for assertpy

Project description

PyPI version Code on Github Code style: black GitHub last commit

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


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 hashes)

Uploaded Source

Built Distribution

assertpy_stubs-1.1.2-py3-none-any.whl (22.6 kB view hashes)

Uploaded Python 3

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