-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Match note error codes to import error codes #16004
Conversation
This comment has been minimized.
This comment has been minimized.
You'll need to update some ignores in mypy itself:
|
This comment has been minimized.
This comment has been minimized.
Diff from mypy_primer, showing the effect of this PR on open source code: poetry (https://github.com/python-poetry/poetry)
+ src/poetry/installation/chef.py:16: error: Unused "type: ignore" comment, use narrower [import-not-found] instead of [import] code [unused-ignore]
schema_salad (https://github.com/common-workflow-language/schema_salad)
+ schema_salad/tests/memory-leak-check.py:5: error: Unused "type: ignore" comment, use narrower [import-not-found] instead of [import] code [unused-ignore]
+ schema_salad/tests/memory-leak-check.py:6: error: Unused "type: ignore" comment, use narrower [import-not-found] instead of [import] code [unused-ignore]
mypy (https://github.com/python/mypy)
+ mypy/report.py:28: error: Unused "type: ignore" comment, use narrower [import-untyped] instead of [import] code [unused-ignore]
+ mypy/test/testreports.py:10: error: Unused "type: ignore" comment, use narrower [import-untyped] instead of [import] code [unused-ignore]
+ mypy/test/testreports.py:25: error: Unused "type: ignore" comment, use narrower [import-untyped] instead of [import] code [unused-ignore]
+ mypy/test/testcmdline.py:23: error: Unused "type: ignore" comment, use narrower [import-untyped] instead of [import] code [unused-ignore]
+ mypy/test/testcheck.py:29: error: Unused "type: ignore" comment, use narrower [import-untyped] instead of [import] code [unused-ignore]
jax (https://github.com/google/jax)
+ jax/_src/pickle_util.py:21: error: Unused "type: ignore" comment, use narrower [import-not-found] instead of [import] code [unused-ignore]
+ jax/experimental/jax2tf/examples/tf_js/quickdraw/quickdraw.py:33: error: Unused "type: ignore" comment, use narrower [import-not-found] instead of [import] code [unused-ignore]
+ jax/experimental/jax2tf/examples/serving/model_server_request.py:18: error: Unused "type: ignore" comment, use narrower [import-not-found] instead of [import] code [unused-ignore]
+ jax/experimental/jax2tf/examples/serving/model_server_request.py:30: error: Unused "type: ignore" comment, use narrower [import-not-found] instead of [import] code [unused-ignore]
+ jax/experimental/jax2tf/examples/serving/model_server_request.py:31: error: Unused "type: ignore" comment, use narrower [import-not-found] instead of [import] code [unused-ignore]
+ jax/experimental/jax2tf/examples/tflite/mnist/mnist.py:25: error: Unused "type: ignore" comment, use narrower [import-not-found] instead of [import] code [unused-ignore]
spark (https://github.com/apache/spark)
+ python/pyspark/profiler.py:41: error: Unused "type: ignore" comment, use narrower [import-not-found] instead of [import] code [unused-ignore]
+ python/pyspark/accumulators.py:30: error: Unused "type: ignore" comment, use narrower [import-not-found] instead of [import] code [unused-ignore]
+ python/pyspark/pandas/sql_processor.py:18: error: Unused "type: ignore" comment, use narrower [import-not-found] instead of [import] code [unused-ignore]
aiohttp (https://github.com/aio-libs/aiohttp)
+ aiohttp/http_writer.py:192: error: Unused "type: ignore" comment, use narrower [import-not-found] instead of [import] code [unused-ignore]
+ aiohttp/http_websocket.py:163: error: Unused "type: ignore" comment, use narrower [import-not-found] instead of [import] code [unused-ignore]
+ aiohttp/http_parser.py:918: error: Unused "type: ignore[import]" comment, use narrower [import-not-found] instead of [import] code [unused-ignore]
- aiohttp/pytest_plugin.py:23:1: note: See https://mypy.rtfd.io/en/stable/_refs.html#code-import for more info
urllib3 (https://github.com/urllib3/urllib3)
+ src/urllib3/util/request.py:24: error: Unused "type: ignore" comment, use narrower [import-not-found] instead of [import] code [unused-ignore]
+ src/urllib3/util/request.py:26: error: Unused "type: ignore" comment, use narrower [import-not-found] instead of [import] code [unused-ignore]
+ src/urllib3/util/request.py:32: error: Unused "type: ignore" comment, use narrower [import-not-found] instead of [import] code [unused-ignore]
+ src/urllib3/response.py:19: error: Unused "type: ignore" comment, use narrower [import-not-found] instead of [import] code [unused-ignore]
+ src/urllib3/response.py:21: error: Unused "type: ignore" comment, use narrower [import-not-found] instead of [import] code [unused-ignore]
+ src/urllib3/response.py:26: error: Unused "type: ignore" comment, use narrower [import-not-found] instead of [import] code [unused-ignore]
+ src/urllib3/contrib/socks.py:44: error: Unused "type: ignore" comment, use narrower [import-not-found] instead of [import] code [unused-ignore]
+ src/urllib3/contrib/pyopenssl.py:43: error: Unused "type: ignore" comment, use narrower [import-untyped] instead of [import] code [unused-ignore]
+ src/urllib3/contrib/pyopenssl.py:73: error: Unused "type: ignore" comment, use narrower [import-untyped] instead of [import] code [unused-ignore]
+ test/__init__.py:21: error: Unused "type: ignore" comment, use narrower [import-not-found] instead of [import] code [unused-ignore]
+ test/__init__.py:23: error: Unused "type: ignore" comment, use narrower [import-not-found] instead of [import] code [unused-ignore]
+ test/__init__.py:28: error: Unused "type: ignore" comment, use narrower [import-not-found] instead of [import] code [unused-ignore]
+ test/contrib/test_socks.py:12: error: Unused "type: ignore" comment, use narrower [import-not-found] instead of [import] code [unused-ignore]
+ test/contrib/test_pyopenssl.py:10: error: Unused "type: ignore" comment, use narrower [import-untyped] instead of [import] code [unused-ignore]
|
Note that the subcode logic is that we only the diagnostic about narrower error codes with If we want to reduce cost of this change, some options are: |
Fixes #16003. Follow up to #14740