poetry-types icon indicating copy to clipboard operation
poetry-types copied to clipboard

A poetry plugin that adds/removes type stubs as dependencies like the mypy --install-types command.

poetry-types

PyPI version GitHub license GitHub issues PyPI - Downloads Tests

Description

This is a plugin to poetry for the upcoming poetry 1.2 plugin feature. It installs/removes/updates typing stubs via following commands:

  • poetry types add <package names>
  • poetry types remove <package names>
  • poetry types update <package names>

Usage examples

  • poetry types add SQLAlchemy adds types-SQLAlchemy to your project
  • poetry types update adds types-SQLAlchemy if SQLAlchemy is present, but not types-SQLAlchemy
  • poetry types update removes types-SQLAlchemy if types-SQLAlchemy is present, but not SQLAlchemy

Installation

Run poetry self add poetry-types for global install or run poetry add -D poetry-types to use this plugin with your project.

Usage with pre-commit

- repo: https://github.com/jvllmr/poetry-types
  rev: v0.4.0
  hooks:
    - id: poetry-types

poetry-types has to be skipped with pre-commit.ci

ci:
  skip: [poetry-types]