Skip to main content

Validator for type annotations

Project description

iStub

Validator for type annotations.

  • Stubs generation
  • Code style checking with flake8
  • Type checking with mypy and pyright
  • Type consistency checking with mypy.stubtest

Usage

Basic usage

Let's assume that you want to check mylib-stubs package against mylib

Create a file istub.yml in your project root:

packages:
  - name: mylib
    path: ./mylib-stubs
    checks:
      mypy: true
      stubtest: true

Run checker:

python -m istub

You can create a whitelist of acceptable errors:

python -m istub --update

Custom configuration

packages:
  - name: mylib
    path: ./mylib-stubs
    checks:
      mypy: true
      stubtest: true
      flake8: false
      pyright: false
    pip_install:
      - pypi_dependency
      - pypi_dependency2
    pip_uninstall:
      - dependency_to_uninstall
    build:
      - ./build_cmd.sh

Latest changes

Full changelog can be found in Releases.

Versioning

istub version follows PEP 440 format.

Support and contributing

Please reports any bugs or request new features in istub repository.

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

istub-0.2.4.tar.gz (9.9 kB view hashes)

Uploaded Source

Built Distribution

istub-0.2.4-py3-none-any.whl (14.0 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