Skip to content

Allow inline type hints to be packaged and distributed (PEP561) #223

@jamesdow21

Description

@jamesdow21

Driver version

Redshift version

Client Operating System

Python version

Table schema

Problem description

It looks like this package has type annotations fully specified inline, but mypy doesn't recognize that the type hints can be used without a "py.typed" marker file (as described in PEP561).

  1. Expected behaviour: Mypy recognizes the inline annotations
  2. Actual behaviour: Mypy errors and skips analyzing anything from the package
  3. Error message/stack trace: error: Skipping analyzing "redshift_connector": module is installed, but missing library stubs or py.typed marker [import-untyped]
  4. Any other details that can be helpful: Very simple fix, just need to add a blank file named "py.typed" to the package root and make sure setuptools includes it in the sdist and wheel

Python Driver trace logs

Reproduction code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions