Skip to content

Couldn't import pyi for 'tqdm.notebook' [pyi-error] #1838

Open
@seangies

Description

The following import statement triggers a pyi error in pytype:

from tqdm.notebook import IProgress

To reproduce:
python-3.9.15
tqdm==4.67.0
pytype==2024.9.13

Test file is foo.py:

from tqdm.notebook import IProgress

def foo():
	pass

Run pytype on it:

~/src/clean ❯ python3 -m pytype foo.py
Computing dependencies
Analyzing 1 sources with 0 local dependencies
ninja: Entering directory `.pytype'
[1/1] check foo
FAILED: ~/src/clean/.pytype/pyi/foo.pyi 
~/.pyenv/versions/venv-clean/bin/python3 -m pytype.main --imports_info ~/src/clean/.pytype/imports/foo.imports --module-name foo --platform darwin -V 3.9 -o ~/src/clean/.pytype/pyi/foo.pyi --analyze-annotated --nofail --quick ~/src/clean/foo.py
~/src/clean/foo.py:1:1: error: in <module>: Couldn't import pyi for 'tqdm.notebook' [pyi-error]
  Unreplaced NamedType: 'tqdm.std.tqdm', referenced from 'tqdm.notebook'

from tqdm.notebook import IProgress~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
from tqdm.notebook import IProgress



For more details, see https://google.github.io/pytype/errors.html#pyi-error
ninja: build stopped: subcommand failed.
Leaving directory '.pytype'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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