Skip to content

types-networkx is not installed by mypy --install-types #18365

Closed

Description

@rentruewang

Bug Report

mypy --install-types missing some libraries' type stubs.

To Reproduce

  1. A project that imports and uses networkx.
  2. mypy --install-types .
  3. Does not install type stubs for networkx.
import networkx
graph = networkx.Graph()

Expected Behavior

mypy --install-types . should install types-networkx like it does for many different libraries.

Actual Behavior

Does not

Your Environment

  • Python version used: 3.12 (but doesn't work for lower versions as well)
  • Mypy version used: Not working for both 1.13, 1.14
  • Mypy command-line flags: --install-types .
  • Mypy configuration options from mypy.ini (and other config files):
show_error_codes = true
exclude = "tests"
check_untyped_defs = true

Activity

  1. added a commit that references this issue on Dec 30, 2024
    f2a77ea
  2. rentruewang commented on Dec 30, 2024

    @rentruewang
    Author

    @hauntsaninja Wow that is quick. However, I have verified that types-networkx is indeed still not installed when I tested a new virtualenv.

  3. hauntsaninja commented on Dec 30, 2024

    @hauntsaninja
    Collaborator

    Works for me on latest master. Are you sure you installed mypy from latest master correctly? (Try mypy --version)

  4. rentruewang commented on Dec 30, 2024

    @rentruewang
    Author

    @hauntsaninja yes lol i have forgotten to pull. I'm wondering tho, where in the code is networkx included? I don't see it in your commit. Is it included by setuptools?

    Also close #18375 because that's before i see the reply.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugmypy got something wrong

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions