#8930·networkx

Consider migrating from mypy to Pyrefly

Author: whyvineetCreated Sep 26, 2026Updated Sep 26, 2026

NetworkX currently relies on mypy for its static type checking. I believe it could be worthwhile to look into whether we should try out a more recent type checker such as Pyrefly or ty. I am especially interested in Pyrefly because of its migration support, speed, and fairly simple configuration.

I'm opening this issue mainly to start a discussion. If the maintainers consider the migration worthwhile, I would be happy to carry it out and prepare the necessary changes. I'd like to know what the maintainers think, or whether there are any existing plans, regarding the current type-checking setup.