Skip to content

Conversation

@KevinRK29
Copy link
Collaborator

When a user mistypes a module name in an import statement, mypy now suggests similar module names that might be what they intended.

@KevinRK29 KevinRK29 requested a review from JukkaL January 30, 2026 08:03
@github-actions
Copy link
Contributor

Diff from mypy_primer, showing the effect of this PR on open source code:

pytest-robotframework (https://github.com/detachhead/pytest-robotframework)
+ pytest_robotframework/_internal/robot/utils.py:279: note: Did you mean "pytest"?
+ pytest_robotframework/_internal/pytest/robot_file_support.py:9: note: Did you mean "pytest"?
+ pytest_robotframework/_internal/pytest/robot_file_support.py:34: note: Did you mean "pytest"?
+ pytest_robotframework/_internal/robot/library.py:10: note: Did you mean "pytest"?
+ pytest_robotframework/_internal/robot/library.py:11: note: Did you mean "pytest"?
+ pytest_robotframework/_internal/robot/listeners_and_suite_visitors.py:16: note: Did you mean "pytest"?
+ pytest_robotframework/_internal/robot/listeners_and_suite_visitors.py:17: note: Did you mean "pytest"?
+ pytest_robotframework/_internal/robot/listeners_and_suite_visitors.py:65: note: Did you mean "pytest"?
+ pytest_robotframework/_internal/pytest/plugin.py:12: note: Did you mean "pytest"?
+ pytest_robotframework/_internal/pytest/plugin.py:13: note: Did you mean "pytest"?
+ pytest_robotframework/_internal/pytest/plugin.py:18: note: Did you mean "pytest"?
+ pytest_robotframework/_internal/pytest/plugin.py:91: note: Did you mean "pytest"?

colour (https://github.com/colour-science/colour)
+ colour/utilities/requirements.py:339: note: Did you mean "pydoc"?
+ colour/utilities/network.py:2000: note: Did you mean "pydoc"?
+ colour/utilities/tests/test_network.py:1072: note: Did you mean "pydoc"?

anyio (https://github.com/agronholm/anyio)
+ src/anyio/pytest_plugin.py:11: note: Did you mean "pytest"?
+ src/anyio/pytest_plugin.py:12: note: Did you mean "pytest"?
+ src/anyio/_backends/_asyncio.py:2217: note: Did you mean "pytest"?

zulip (https://github.com/zulip/zulip)
+ zerver/migrations/0463_backfill_realmplayground_url_template.py:1: note: Did you mean "uritemplate"?
+ zerver/migrations/0441_backfill_realmfilter_url_template.py:5: note: Did you mean "uritemplate"?
+ zerver/migrations/0359_re2_linkifiers.py:1: note: Did you mean "re"?
+ zerver/models/linkifiers.py:1: note: Did you mean "re"?
+ zerver/models/linkifiers.py:2: note: Did you mean "uritemplate"?
+ zerver/models/realm_playgrounds.py:1: note: Did you mean "uritemplate"?
+ zerver/lib/url_encoding.py:7: note: Did you mean "re"?
+ zerver/lib/markdown/__init__.py:28: note: Did you mean "re"?
+ zerver/lib/markdown/__init__.py:31: note: Did you mean "uritemplate"?
+ zerver/lib/templates.py:16: note: Did you mean "_markupbase"?
+ zerver/lib/email_notifications.py:26: note: Did you mean "_markupbase"?
+ zerver/forms.py:21: note: Did you mean "_markupbase"?
+ zerver/lib/digest.py:14: note: Did you mean "_markupbase"?
+ zerver/views/documentation.py:17: note: Did you mean "_markupbase"?
+ corporate/lib/activity.py:15: note: Did you mean "_markupbase"?
+ corporate/views/realm_activity.py:12: note: Did you mean "_markupbase"?
+ zerver/tests/test_slack_importer.py:14: note: Did you mean "attrs"?
+ corporate/views/installation_activity.py:10: note: Did you mean "_markupbase"?

starlette (https://github.com/encode/starlette)
+ starlette/testclient.py:38: note: Did you mean "http"?
+ tests/types.py:5: note: Did you mean "http"?

strawberry (https://github.com/strawberry-graphql/strawberry)
+ strawberry/cli/app.py:1: note: Did you mean "types"?
+ strawberry/cli/commands/server.py:3: note: Did you mean "types"?
+ strawberry/cli/commands/upgrade/__init__.py:8: note: Did you mean "types"?
+ strawberry/cli/commands/schema_codegen.py:3: note: Did you mean "types"?
+ strawberry/cli/utils/__init__.py:4: note: Did you mean "types"?
+ strawberry/channels/testing.py:24: note: Did you mean "wsgiref"?
+ strawberry/cli/commands/locate_definition.py:3: note: Did you mean "types"?
+ strawberry/cli/commands/export_schema.py:3: note: Did you mean "types"?
+ strawberry/cli/commands/dev.py:7: note: Did you mean "types"?
+ strawberry/cli/commands/codegen.py:10: note: Did you mean "types"?
+ strawberry/litestar/controller.py:37: note: Did you mean "fsspec"?
+ strawberry/django/views.py:11: note: Did you mean "wsgiref"?

cki-lib (https://gitlab.com/cki-project/cki-lib)
+ cki_lib/gitlab.py:19: note: Did you mean "graphlib"?

operator (https://github.com/canonical/operator)
+ ops/pebble.py:75: note: Did you mean "websockets"?

urllib3 (https://github.com/urllib3/urllib3)
+ dummyserver/asgi_proxy.py:6: note: Did you mean "http"?

comtypes (https://github.com/enthought/comtypes)
+ comtypes/test/test_recordinfo.py:11: note: Did you mean "_ctypes"?
+ comtypes/test/test_puredispatch.py:11: note: Did you mean "_ctypes"?
+ comtypes/test/test_npsupport.py:137: note: Did you mean "_ctypes"?
+ comtypes/test/test_midl_safearray_create.py:11: note: Did you mean "_ctypes"?
+ comtypes/test/test_midl_safearray_create.py:17: note: Did you mean "_ctypes"?
+ comtypes/test/test_excel.py:20: note: Did you mean "_ctypes"?
+ comtypes/test/test_eventinterface.py:131: note: Did you mean "_ctypes"?
+ comtypes/test/test_dyndispatch.py:9: note: Did you mean "_ctypes"?
+ comtypes/test/test_dispifc_safearrays.py:13: note: Did you mean "_ctypes"?
+ comtypes/test/test_dispifc_records.py:11: note: Did you mean "_ctypes"?
+ comtypes/test/test_dict.py:11: note: Did you mean "_ctypes"?
+ comtypes/test/test_QueryService.py:12: note: Did you mean "_ctypes"?
+ comtypes/test/test_viewobject.py:22: note: Did you mean "_ctypes"?
+ comtypes/test/test_viewobject.py:23: note: Did you mean "_ctypes"?
+ comtypes/test/test_client.py:174: note: Did you mean "_ctypes"?
+ comtypes/test/test_stream.py:45: note: Did you mean "_ctypes"?
+ comtypes/test/test_stream.py:46: note: Did you mean "_ctypes"?
+ comtypes/test/test_storage.py:21: note: Did you mean "_ctypes"?
+ comtypes/test/test_rot.py:24: note: Did you mean "_ctypes"?
+ comtypes/test/test_moniker.py:36: note: Did you mean "_ctypes"?
+ comtypes/test/test_bctx.py:18: note: Did you mean "_ctypes"?
+ comtypes/test/TestComServer.py:34: note: Did you mean "_ctypes"?
+ comtypes/test/test_comserver.py:239: note: Did you mean "_ctypes"?

pyodide (https://github.com/pyodide/pyodide)
+ pyodide-build/pyodide_build/tests/test_cli_xbuildenv.py:8: note: Did you mean "types"?
+ pyodide-build/pyodide_build/tests/test_cli_install_emscripten.py:6: note: Did you mean "types"?
+ pyodide-build/pyodide_build/tests/test_cli_clean.py:3: note: Did you mean "types"?
+ pyodide-build/pyodide_build/tests/test_pypi.py:13: note: Did you mean "types"?
+ pyodide-build/pyodide_build/tests/test_cli.py:8: note: Did you mean "types"?

apprise (https://github.com/caronc/apprise)
+ apprise/plugins/smpp.py:31: note: Did you mean "smtplib" or "poplib"?
+ apprise/plugins/smpp.py:32: note: Did you mean "smtplib" or "poplib"?
+ apprise/plugins/smpp.py:33: note: Did you mean "smtplib" or "poplib"?
+ apprise/plugins/gnome.py:38: note: Did you mean "git"?
+ apprise/plugins/gnome.py:45: note: Did you mean "git"?
+ apprise/plugins/glib.py:44: note: Did you mean "git"?
+ apprise/plugins/glib.py:47: note: Did you mean "git"?
+ apprise/plugins/dbus.py:84: note: Did you mean "git"?
+ apprise/plugins/dbus.py:86: note: Did you mean "git"?
+ tests/test_plugin_smpp.py:40: note: Did you mean "smtplib" or "poplib"?
+ tests/test_plugin_gnome.py:419: note: Did you mean "git"?
+ tests/test_plugin_glib.py:134: note: Did you mean "git"?
+ tests/test_plugin_dbus.py:248: note: Did you mean "git"?

scipy-stubs (https://github.com/scipy/scipy-stubs)
+ scipy-stubs/_lib/_array_api.pyi:9: note: Did you mean "pytest"?

materialize (https://github.com/MaterializeInc/materialize)
+ misc/python/materialize/scalability/operation/operation_data.py:12: note: Did you mean "psycopg2"?
+ misc/python/materialize/scalability/endpoint/endpoint.py:13: note: Did you mean "psycopg2"?
+ misc/python/materialize/output_consistency/ignore_filter/ignore_verdict.py:10: note: Did you mean "attrs"?
+ misc/python/materialize/test_analytics/connector/test_analytics_connector.py:15: note: Did you mean "psycopg2"?
+ misc/python/materialize/scalability/operation/scalability_operation.py:10: note: Did you mean "psycopg2"?
+ misc/python/materialize/test_analytics/setup/test_analytics_setup.py:12: note: Did you mean "psycopg2"?
+ misc/python/materialize/scalability/operation/operations/operations.py:9: note: Did you mean "psycopg2"?
+ misc/python/materialize/util.py:29: note: Did you mean "psycopg2"?
+ misc/python/materialize/scalability/workload/workload.py:10: note: Did you mean "psycopg2"?
+ misc/python/materialize/cli/mz_workload_capture.py:18: note: Did you mean "psycopg2"?
+ misc/python/materialize/cli/mz_workload_capture.py:20: note: Did you mean "psycopg2"?
+ misc/python/materialize/mzcompose/__init__.py:26: note: Did you mean "psycopg2"?
+ misc/python/materialize/optbench/sql.py:17: note: Did you mean "psycopg2"?
+ misc/python/materialize/cli/run.py:29: note: Did you mean "psycopg2"?
+ misc/python/materialize/mzexplore/extract.py:22: note: Did you mean "psycopg2"?
+ misc/python/materialize/mzexplore/clone.py:21: note: Did you mean "psycopg2"?
+ misc/python/materialize/benches/avro_ingest.py:20: note: Did you mean "psycopg2"?
+ misc/python/materialize/benches/avro_ingest.py:23: note: Did you mean "psycopg2"?
+ misc/python/materialize/mzcompose/composition.py:42: note: Did you mean "psycopg2"?
+ misc/python/materialize/mzcompose/composition.py:46: note: Did you mean "psycopg2"?
+ misc/python/materialize/workload_replay/replay.py:24: note: Did you mean "psycopg2"?
+ misc/python/materialize/workload_replay/replay.py:25: note: Did you mean "psycopg2"?
+ misc/python/materialize/workload_replay/objects.py:22: note: Did you mean "psycopg2"?
+ misc/python/materialize/workload_replay/objects.py:24: note: Did you mean "psycopg2"?
+ misc/python/materialize/scalability/endpoint/endpoints.py:10: note: Did you mean "psycopg2"?
+ misc/python/materialize/parallel_benchmark/framework.py:20: note: Did you mean "psycopg2"?
+ misc/python/materialize/data_ingest/executor.py:17: note: Did you mean "psycopg2"?
+ misc/python/materialize/data_ingest/executor.py:28: note: Did you mean "psycopg2"?
+ misc/python/materialize/scalability/executor/benchmark_executor.py:17: note: Did you mean "psycopg2"?
+ misc/python/materialize/workload_replay/ingest.py:27: note: Did you mean "psycopg2"?
+ misc/python/materialize/workload_replay/ingest.py:35: note: Did you mean "psycopg2"?
+ misc/python/materialize/data_ingest/workload.py:16: note: Did you mean "psycopg2"?
+ misc/python/materialize/workload_replay/data.py:21: note: Did you mean "psycopg2"?
+ misc/python/materialize/workload_replay/data.py:22: note: Did you mean "psycopg2"?
+ misc/python/materialize/parallel_workload/executor.py:16: note: Did you mean "psycopg2"?
+ misc/python/materialize/parallel_workload/executor.py:18: note: Did you mean "websockets"?
+ misc/python/materialize/parallel_workload/action.py:20: note: Did you mean "psycopg2"?
+ misc/python/materialize/parallel_workload/action.py:22: note: Did you mean "websockets"?
+ misc/python/materialize/parallel_workload/action.py:25: note: Did you mean "psycopg2"?
+ misc/python/materialize/parallel_workload/worker.py:15: note: Did you mean "psycopg2"?
+ misc/python/materialize/parallel_workload/worker.py:16: note: Did you mean "websockets"?
+ misc/python/materialize/parallel_workload/parallel_workload.py:20: note: Did you mean "psycopg2"?
+ misc/python/materialize/output_consistency/execution/sql_executor.py:13: note: Did you mean "psycopg2"?
+ misc/python/materialize/output_consistency/execution/sql_executor.py:14: note: Did you mean "psycopg2"?
+ misc/python/materialize/output_consistency/output_consistency_test.py:12: note: Did you mean "psycopg2"?
+ misc/python/materialize/output_consistency/output_consistency_test.py:14: note: Did you mean "psycopg2"?
+ misc/python/materialize/version_consistency/version_consistency_test.py:11: note: Did you mean "psycopg2"?
+ misc/python/materialize/version_consistency/version_consistency_test.py:12: note: Did you mean "psycopg2"?
+ misc/python/materialize/postgres_consistency/postgres_consistency_test.py:11: note: Did you mean "psycopg2"?
+ misc/python/materialize/postgres_consistency/postgres_consistency_test.py:12: note: Did you mean "psycopg2"?
+ misc/python/materialize/feature_flag_consistency/feature_flag_consistency_test.py:12: note: Did you mean "psycopg2"?
+ misc/python/materialize/feature_flag_consistency/feature_flag_consistency_test.py:13: note: Did you mean "psycopg2"?

cloud-init (https://github.com/canonical/cloud-init)
+ cloudinit/distros/netbsd.py:15: note: Did you mean "bcrypt"?
+ cloudinit/sources/DataSourceAzure.py:53: note: Did you mean "bcrypt"?

schema_salad (https://github.com/common-workflow-language/schema_salad)
+ schema_salad/tests/test_cwl11.py:16:1: note: Did you mean "pytest"?
+ schema_salad/tests/test_ref_resolver.py:11:1: note: Did you mean "pytest"?

Copy link
Collaborator

@hauntsaninja hauntsaninja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(For some of these fuzzy match PRs, maybe worth gating by if not prefer_simple_messages)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants