Skip to content

mypy doesn't pick up type hints[BUG] #2166

@letmejustputthishere

Description

@letmejustputthishere

Steps to reproduce

  1. import python-telegram-bot modules into your test.py file (e.g. from telegram import InlineKeyboardMarkup)

  2. run mypy test.py

  3. receive the following output error: Skipping analyzing 'telegram': found module but no type hints or library stubs

Expected behaviour

mypy should pickup the typehints as they've been added in the latest release (version 13 )

Actual behaviour

mypy doesn't pickup the typehints.

I'm confident this can be solved by either

  1. adding python-telegram-bot to typeshed
  2. adding a py.typed file

More information can be found here.

Configuration

Operating System:
Ubuntu 18.04

Version of Python, python-telegram-bot & dependencies:

$ python -m telegram
python-telegram-bot 13.0
certifi 2020.06.20
Python 3.8.0 (default, Oct 30 2020, 19:06:04) [GCC 7.5.0]

Logs

error: Skipping analyzing 'telegram.ext': found module but no type hints or library stubs
note: See https://mypy.readthedocs.io/en/latest/running_mypy.html#missing-imports
error: Skipping analyzing 'telegram': found module but no type hints or library stubs
error: Skipping analyzing 'telegram.ext': found module but no type hints or library stubs
error: Skipping analyzing 'telegram': found module but no type hints or library stubs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions