Skip to content

mypy error on progress bar usage #1892

Description

@decaz

xxx.py:

import click

with click.progressbar([1, 2, 3]) as bar:
    for x in bar:
        pass

mypy error:

$ mypy xxx.py 
xxx.py:4: error: "Iterable[<nothing>]" has no attribute "__next__"  [attr-defined]
Found 1 error in 1 file (checked 1 source file)

Environment:

  • Python version: 3.9.5
  • Click version: 8.0.0
  • mypy version: 0.812

Metadata

Metadata

Assignees

Labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions