Skip to content

tqdm is not recognized as iterable #1856

@seermer

Description

@seermer

Describe the Bug

When using Pyrefly for type checking on tqdm, it fails to recognize tqdm as an interable:
Minimal script:

import tqdm


lst = []

for i in tqdm.tqdm(lst):
    pass

Results:

$ pyrefly check ./playground2.py
ERROR Type `object` is not iterable [not-iterable]
 --> playground2.py:6:10
  |
6 | for i in tqdm.tqdm(obj):
  |          ^^^^^^^^^^^^^^
  |
 INFO 1 error

Expected: tqdm can be used as an iterable, therefore should not show error message.

(possibly similar issue as in #1375 (comment))

Sandbox Link

No response

(Only applicable for extension issues) IDE Information

No response

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions