Skip to content

[BUG] False positive mypy error when using telegram.ext #2580

@revolter

Description

@revolter

Steps to reproduce

  1. Install mypy
  2. Write import telegram.ext and var = telegram.ext.CallbackContext()
  3. Run mypy

Expected behaviour

Only the error

Too few arguments for "CallbackContext"  [call-arg] (3:7)

should be thrown.

I'm pretty sure this used to be ok in a previous version.

Actual behaviour

The errors

Too few arguments for "CallbackContext"  [call-arg] (3:7)
Need type annotation for 'var'  [var-annotated] (3:7)

are thrown.

Configuration

Operating System:

macOS 11.4 (20F71)

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

python-telegram-bot 13.7
Bot API 5.3
certifi 2020.12.05
Python 3.9.5 (default, May  4 2021, 03:36:27)  [Clang 12.0.0 (clang-1200.0.32.29)]

Logs

Insert logs here (if necessary)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy