-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Split import-untyped into import-untyped and import-untyped-stubs-available #19101
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
base: master
Are you sure you want to change the base?
Conversation
|
As I was making this change, and adapting the mypy codebase to include some new stubs, I realized that the requirements.txt files tell you to run |
This comment has been minimized.
This comment has been minimized.
|
An interesting mypy_primer diff! We can safely ignore all of the candy stripes where some [import-untyped] just became some [import-untyped-stubs-available]. (Side note: are people just running mypy on these projects and getting hundreds of errors, which they don't look at? What?). The ones where there are now just a bunch of import-untyped-stubs-available also seem uninteresting; these guys were just globally ignoring import-untyped, or whatever, and they can globally ignore import-untyped-stubs-available too. A couple of them have the interesting type of error, along the lines of: This is what this change seeks to promote, and implicitly we think users will find it more useful than it is annoying. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
|
Ok, since merging there's a new error I need to deal with — maybe related to the reports.test thing? — so it's back to being a draft PR until then. Unless merging again fixes it. (edit: I later fixed this.) |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
e3046e6 to
65a3254
Compare
This comment has been minimized.
This comment has been minimized.
| error_codes[code] = self | ||
|
|
||
| def is_import_related_code(self) -> bool: | ||
| return IMPORT in (self.code, self.sub_code_of) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Informtional:) This could easily be generalized to is_related_code, but hey: he who actually wants that feature is free to do that refactor, YAGNI, etc.
| if info.blocker: | ||
| self.has_blockers.add(file) | ||
| if info.code in (IMPORT, IMPORT_UNTYPED, IMPORT_NOT_FOUND): | ||
| if info.code is not None and info.code.is_import_related_code(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Informational:) this code pattern also suggests refactoring into a static function (so it can just handle None as well instead of needing this check), but I didn't because YAGNI; this was fine.
This comment has been minimized.
This comment has been minimized.
|
Diff from mypy_primer, showing the effect of this PR on open source code: spark (https://github.com/apache/spark)
- python/pyspark/sql/connect/utils.py:72: error: Library stubs not installed for "grpc_status" [import-untyped]
+ python/pyspark/sql/connect/utils.py:72: error: Library stubs not installed for "grpc_status" [import-untyped-stubs-available]
- python/pyspark/sql/connect/client/retries.py:24: error: Library stubs not installed for "grpc_status" [import-untyped]
+ python/pyspark/sql/connect/client/retries.py:24: error: Library stubs not installed for "grpc_status" [import-untyped-stubs-available]
- python/pyspark/sql/connect/client/reattach.py:30: error: Library stubs not installed for "grpc_status" [import-untyped]
+ python/pyspark/sql/connect/client/reattach.py:30: error: Library stubs not installed for "grpc_status" [import-untyped-stubs-available]
- python/pyspark/sql/connect/client/core.py:59: error: Library stubs not installed for "grpc_status" [import-untyped]
+ python/pyspark/sql/connect/client/core.py:59: error: Library stubs not installed for "grpc_status" [import-untyped-stubs-available]
prefect (https://github.com/PrefectHQ/prefect)
- src/prefect/server/api/collections.py:6: error: Library stubs not installed for "cachetools" [import-untyped]
+ src/prefect/server/api/collections.py:6: error: Library stubs not installed for "cachetools" [import-untyped-stubs-available]
- src/prefect/settings/sources.py:9: error: Library stubs not installed for "cachetools" [import-untyped]
+ src/prefect/settings/sources.py:9: error: Library stubs not installed for "cachetools" [import-untyped-stubs-available]
- src/prefect/_internal/compatibility/deprecated.py:66: error: Library stubs not installed for "dateparser" [import-untyped]
+ src/prefect/_internal/compatibility/deprecated.py:66: error: Library stubs not installed for "dateparser" [import-untyped-stubs-available]
- src/prefect/server/utilities/messaging/memory.py:17: error: Library stubs not installed for "cachetools" [import-untyped]
+ src/prefect/server/utilities/messaging/memory.py:17: error: Library stubs not installed for "cachetools" [import-untyped-stubs-available]
- src/prefect/logging/clients.py:16: error: Library stubs not installed for "cachetools" [import-untyped]
+ src/prefect/logging/clients.py:16: error: Library stubs not installed for "cachetools" [import-untyped-stubs-available]
- src/prefect/events/clients.py:20: error: Library stubs not installed for "cachetools" [import-untyped]
+ src/prefect/events/clients.py:20: error: Library stubs not installed for "cachetools" [import-untyped-stubs-available]
- src/prefect/task_runs.py:10: error: Library stubs not installed for "cachetools" [import-untyped]
+ src/prefect/task_runs.py:10: error: Library stubs not installed for "cachetools" [import-untyped-stubs-available]
- src/prefect/_waiters.py:13: error: Library stubs not installed for "cachetools" [import-untyped]
+ src/prefect/_waiters.py:13: error: Library stubs not installed for "cachetools" [import-untyped-stubs-available]
- src/prefect/server/events/actions.py:36: error: Library stubs not installed for "cachetools" [import-untyped]
+ src/prefect/server/events/actions.py:36: error: Library stubs not installed for "cachetools" [import-untyped-stubs-available]
- src/prefect/results.py:23: error: Library stubs not installed for "cachetools" [import-untyped]
+ src/prefect/results.py:23: error: Library stubs not installed for "cachetools" [import-untyped-stubs-available]
- src/prefect/server/models/events.py:5: error: Library stubs not installed for "cachetools" [import-untyped]
+ src/prefect/server/models/events.py:5: error: Library stubs not installed for "cachetools" [import-untyped-stubs-available]
- src/prefect/server/database/query_components.py:18: error: Library stubs not installed for "cachetools" [import-untyped]
+ src/prefect/server/database/query_components.py:18: error: Library stubs not installed for "cachetools" [import-untyped-stubs-available]
- src/prefect/runner/runner.py:72: error: Library stubs not installed for "cachetools" [import-untyped]
+ src/prefect/runner/runner.py:72: error: Library stubs not installed for "cachetools" [import-untyped-stubs-available]
- src/prefect/server/events/ordering/memory.py:11: error: Library stubs not installed for "cachetools" [import-untyped]
+ src/prefect/server/events/ordering/memory.py:11: error: Library stubs not installed for "cachetools" [import-untyped-stubs-available]
- src/prefect/server/events/ordering/db.py:13: error: Library stubs not installed for "cachetools" [import-untyped]
+ src/prefect/server/events/ordering/db.py:13: error: Library stubs not installed for "cachetools" [import-untyped-stubs-available]
- src/prefect/cli/deployment.py:880: error: Library stubs not installed for "dateparser" [import-untyped]
+ src/prefect/cli/deployment.py:880: error: Library stubs not installed for "dateparser" [import-untyped-stubs-available]
typeshed-stats (https://github.com/AlexWaygood/typeshed-stats)
- website_macros.py:17: error: Library stubs not installed for "markdown" [import-untyped]
+ website_macros.py:17: error: Library stubs not installed for "markdown" [import-untyped-stubs-available]
- tests/test_serialize.py:7: error: Library stubs not installed for "markdown" [import-untyped]
+ tests/test_serialize.py:7: error: Library stubs not installed for "markdown" [import-untyped-stubs-available]
- tests/test__cli.py:16: error: Library stubs not installed for "markdown" [import-untyped]
+ tests/test__cli.py:16: error: Library stubs not installed for "markdown" [import-untyped-stubs-available]
colour (https://github.com/colour-science/colour)
- colour/utilities/requirements.py:224: error: Library stubs not installed for "networkx" [import-untyped]
+ colour/utilities/requirements.py:224: error: Library stubs not installed for "networkx" [import-untyped-stubs-available]
- colour/utilities/requirements.py:387: error: Library stubs not installed for "tqdm" [import-untyped]
+ colour/utilities/requirements.py:387: error: Library stubs not installed for "tqdm" [import-untyped-stubs-available]
- colour/utilities/network.py:1809: error: Library stubs not installed for "networkx" [import-untyped]
+ colour/utilities/network.py:1809: error: Library stubs not installed for "networkx" [import-untyped-stubs-available]
- colour/recovery/jakob2019.py:66: error: Library stubs not installed for "tqdm" [import-untyped]
+ colour/recovery/jakob2019.py:66: error: Library stubs not installed for "tqdm" [import-untyped-stubs-available]
- colour/recovery/otsu2018.py:71: error: Library stubs not installed for "tqdm" [import-untyped]
+ colour/recovery/otsu2018.py:71: error: Library stubs not installed for "tqdm" [import-untyped-stubs-available]
- colour/graph/conversion.py:1779: error: Library stubs not installed for "networkx" [import-untyped]
+ colour/graph/conversion.py:1779: error: Library stubs not installed for "networkx" [import-untyped-stubs-available]
- colour/graph/common.py:64: error: Library stubs not installed for "networkx" [import-untyped]
+ colour/graph/common.py:64: error: Library stubs not installed for "networkx" [import-untyped-stubs-available]
- colour/plotting/graph.py:80: error: Library stubs not installed for "networkx" [import-untyped]
+ colour/plotting/graph.py:80: error: Library stubs not installed for "networkx" [import-untyped-stubs-available]
mypy (https://github.com/python/mypy)
+ mypy/report.py:29: error: Unused "type: ignore" comment [unused-ignore]
+ mypy/report.py:29: error: Library stubs not installed for "lxml" [import-untyped-stubs-available]
+ mypy/report.py:29: note: Error code "import-untyped-stubs-available" not covered by "type: ignore" comment
+ mypy/report.py:29: note: Hint: "python3 -m pip install lxml-stubs"
+ mypy/report.py:29: note: See https://mypy.rtfd.io/en/stable/_refs.html#code-import-untyped-stubs-available for more info
+ mypy/report.py:29: note: (or run "mypy --install-types" to install all missing stub packages)
+ mypy/test/testreports.py:11: error: Unused "type: ignore" comment [unused-ignore]
+ mypy/test/testreports.py:11: error: Library stubs not installed for "lxml" [import-untyped-stubs-available]
+ mypy/test/testreports.py:11: note: Error code "import-untyped-stubs-available" not covered by "type: ignore" comment
+ mypy/test/testreports.py:26: error: Unused "type: ignore" comment [unused-ignore]
+ mypy/test/testreports.py:26: error: Library stubs not installed for "lxml.etree" [import-untyped-stubs-available]
+ mypy/test/testreports.py:26: note: Error code "import-untyped-stubs-available" not covered by "type: ignore" comment
+ mypy/test/testcmdline.py:23: error: Unused "type: ignore" comment [unused-ignore]
+ mypy/test/testcmdline.py:23: error: Library stubs not installed for "lxml" [import-untyped-stubs-available]
+ mypy/test/testcmdline.py:23: note: Error code "import-untyped-stubs-available" not covered by "type: ignore" comment
+ mypy/test/testcheck.py:29: error: Unused "type: ignore" comment [unused-ignore]
+ mypy/test/testcheck.py:29: error: Library stubs not installed for "lxml" [import-untyped-stubs-available]
+ mypy/test/testcheck.py:29: note: Error code "import-untyped-stubs-available" not covered by "type: ignore" comment
zulip (https://github.com/zulip/zulip)
- zerver/lib/zstd_level9.py:1: error: Library stubs not installed for "zstd" [import-untyped]
+ zerver/lib/zstd_level9.py:1: error: Library stubs not installed for "zstd" [import-untyped-stubs-available]
- zerver/lib/html_diff.py:1: error: Library stubs not installed for "lxml.html" [import-untyped]
+ zerver/lib/html_diff.py:1: error: Library stubs not installed for "lxml.html" [import-untyped-stubs-available]
- zerver/lib/html_diff.py:1: error: Library stubs not installed for "lxml" [import-untyped]
+ zerver/lib/html_diff.py:1: error: Library stubs not installed for "lxml" [import-untyped-stubs-available]
- zerver/lib/html_diff.py:2: error: Library stubs not installed for "lxml.html.diff" [import-untyped]
+ zerver/lib/html_diff.py:2: error: Library stubs not installed for "lxml.html.diff" [import-untyped-stubs-available]
- zerver/lib/db.py:5: error: Library stubs not installed for "psycopg2.extensions" [import-untyped]
+ zerver/lib/db.py:5: error: Library stubs not installed for "psycopg2.extensions" [import-untyped-stubs-available]
- zerver/lib/db.py:6: error: Library stubs not installed for "psycopg2.sql" [import-untyped]
+ zerver/lib/db.py:6: error: Library stubs not installed for "psycopg2.sql" [import-untyped-stubs-available]
- zerver/lib/migrate.py:9: error: Library stubs not installed for "psycopg2.sql" [import-untyped]
+ zerver/lib/migrate.py:9: error: Library stubs not installed for "psycopg2.sql" [import-untyped-stubs-available]
- zerver/worker/user_activity.py:7: error: Library stubs not installed for "psycopg2.sql" [import-untyped]
+ zerver/worker/user_activity.py:7: error: Library stubs not installed for "psycopg2.sql" [import-untyped-stubs-available]
- zproject/wsgi.py:79: error: Library stubs not installed for "uwsgi" [import-untyped]
+ zproject/wsgi.py:79: error: Library stubs not installed for "uwsgi" [import-untyped-stubs-available]
- zerver/migrations/0705_stream_subscriber_count_data_migration.py:4: error: Library stubs not installed for "psycopg2" [import-untyped]
+ zerver/migrations/0705_stream_subscriber_count_data_migration.py:4: error: Library stubs not installed for "psycopg2" [import-untyped-stubs-available]
- zerver/migrations/0696_rename_no_topic_to_empty_string_topic.py:11: error: Library stubs not installed for "psycopg2.sql" [import-untyped]
+ zerver/migrations/0696_rename_no_topic_to_empty_string_topic.py:11: error: Library stubs not installed for "psycopg2.sql" [import-untyped-stubs-available]
- zerver/migrations/0691_backfill_message_is_channel_message.py:4: error: Library stubs not installed for "psycopg2.sql" [import-untyped]
+ zerver/migrations/0691_backfill_message_is_channel_message.py:4: error: Library stubs not installed for "psycopg2.sql" [import-untyped-stubs-available]
- zerver/migrations/0689_mark_navigation_tour_video_as_read.py:7: error: Library stubs not installed for "psycopg2.sql" [import-untyped]
+ zerver/migrations/0689_mark_navigation_tour_video_as_read.py:7: error: Library stubs not installed for "psycopg2.sql" [import-untyped-stubs-available]
- zerver/migrations/0680_rename_general_chat_to_empty_string_topic.py:11: error: Library stubs not installed for "psycopg2.sql" [import-untyped]
+ zerver/migrations/0680_rename_general_chat_to_empty_string_topic.py:11: error: Library stubs not installed for "psycopg2.sql" [import-untyped-stubs-available]
- zerver/migrations/0610_mark_introduce_resolve_topic_modal_as_read.py:8: error: Library stubs not installed for "psycopg2.sql" [import-untyped]
+ zerver/migrations/0610_mark_introduce_resolve_topic_modal_as_read.py:8: error: Library stubs not installed for "psycopg2.sql" [import-untyped-stubs-available]
- zerver/migrations/0568_mark_narrow_to_dm_with_welcome_bot_new_user_as_read.py:7: error: Library stubs not installed for "psycopg2.sql" [import-untyped]
+ zerver/migrations/0568_mark_narrow_to_dm_with_welcome_bot_new_user_as_read.py:7: error: Library stubs not installed for "psycopg2.sql" [import-untyped-stubs-available]
- zerver/migrations/0564_purge_nagios_messages.py:7: error: Library stubs not installed for "psycopg2.sql" [import-untyped]
+ zerver/migrations/0564_purge_nagios_messages.py:7: error: Library stubs not installed for "psycopg2.sql" [import-untyped-stubs-available]
- zerver/migrations/0513_copy_groups_data_to_named_user_group.py:6: error: Library stubs not installed for "psycopg2.sql" [import-untyped]
+ zerver/migrations/0513_copy_groups_data_to_named_user_group.py:6: error: Library stubs not installed for "psycopg2.sql" [import-untyped-stubs-available]
- zerver/migrations/0501_mark_introduce_zulip_view_modals_as_read.py:8: error: Library stubs not installed for "psycopg2.sql" [import-untyped]
+ zerver/migrations/0501_mark_introduce_zulip_view_modals_as_read.py:8: error: Library stubs not installed for "psycopg2.sql" [import-untyped-stubs-available]
- zerver/migrations/0423_fix_email_gateway_attachment_owner.py:7: error: Library stubs not installed for "psycopg2.sql" [import-untyped]
+ zerver/migrations/0423_fix_email_gateway_attachment_owner.py:7: error: Library stubs not installed for "psycopg2.sql" [import-untyped-stubs-available]
- zerver/migrations/0257_fix_has_link_attribute.py:6: error: Library stubs not installed for "lxml" [import-untyped]
+ zerver/migrations/0257_fix_has_link_attribute.py:6: error: Library stubs not installed for "lxml" [import-untyped-stubs-available]
- zerver/migrations/0239_usermessage_copy_id_to_bigint_id.py:9: error: Library stubs not installed for "psycopg2.sql" [import-untyped]
+ zerver/migrations/0239_usermessage_copy_id_to_bigint_id.py:9: error: Library stubs not installed for "psycopg2.sql" [import-untyped-stubs-available]
- zerver/migrations/0102_convert_muted_topic.py:6: error: Library stubs not installed for "psycopg2.sql" [import-untyped]
+ zerver/migrations/0102_convert_muted_topic.py:6: error: Library stubs not installed for "psycopg2.sql" [import-untyped-stubs-available]
- zerver/migrations/0486_clear_old_data_for_unused_usermessage_flags.py:5: error: Library stubs not installed for "psycopg2.sql" [import-untyped]
+ zerver/migrations/0486_clear_old_data_for_unused_usermessage_flags.py:5: error: Library stubs not installed for "psycopg2.sql" [import-untyped-stubs-available]
- zerver/migrations/0244_message_copy_pub_date_to_date_sent.py:8: error: Library stubs not installed for "psycopg2.sql" [import-untyped]
+ zerver/migrations/0244_message_copy_pub_date_to_date_sent.py:8: error: Library stubs not installed for "psycopg2.sql" [import-untyped-stubs-available]
- zerver/data_import/slack_message_conversion.py:6: error: Library stubs not installed for "regex" [import-untyped]
+ zerver/data_import/slack_message_conversion.py:6: error: Library stubs not installed for "regex" [import-untyped-stubs-available]
- zerver/lib/user_message.py:2: error: Library stubs not installed for "psycopg2.extras" [import-untyped]
+ zerver/lib/user_message.py:2: error: Library stubs not installed for "psycopg2.extras" [import-untyped-stubs-available]
- zerver/lib/user_message.py:3: error: Library stubs not installed for "psycopg2.sql" [import-untyped]
+ zerver/lib/user_message.py:3: error: Library stubs not installed for "psycopg2.sql" [import-untyped-stubs-available]
- zerver/lib/user_groups.py:11: error: Library stubs not installed for "psycopg2.sql" [import-untyped]
+ zerver/lib/user_groups.py:11: error: Library stubs not installed for "psycopg2.sql" [import-untyped-stubs-available]
- zerver/lib/stream_subscription.py:10: error: Library stubs not installed for "psycopg2" [import-untyped]
+ zerver/lib/stream_subscription.py:10: error: Library stubs not installed for "psycopg2" [import-untyped-stubs-available]
- zerver/lib/stream_subscription.py:11: error: Library stubs not installed for "psycopg2.extras" [import-untyped]
+ zerver/lib/stream_subscription.py:11: error: Library stubs not installed for "psycopg2.extras" [import-untyped-stubs-available]
- analytics/lib/counts.py:11: error: Library stubs not installed for "psycopg2.sql" [import-untyped]
+ analytics/lib/counts.py:11: error: Library stubs not installed for "psycopg2.sql" [import-untyped-stubs-available]
- zilencer/lib/remote_counts.py:5: error: Library stubs not installed for "psycopg2.sql" [import-untyped]
+ zilencer/lib/remote_counts.py:5: error: Library stubs not installed for "psycopg2.sql" [import-untyped-stubs-available]
- zerver/lib/user_topics.py:10: error: Library stubs not installed for "psycopg2.sql" [import-untyped]
+ zerver/lib/user_topics.py:10: error: Library stubs not installed for "psycopg2.sql" [import-untyped-stubs-available]
- zerver/lib/retention.py:39: error: Library stubs not installed for "psycopg2.sql" [import-untyped]
+ zerver/lib/retention.py:39: error: Library stubs not installed for "psycopg2.sql" [import-untyped-stubs-available]
- zerver/lib/export.py:36: error: Library stubs not installed for "psycopg2" [import-untyped]
+ zerver/lib/export.py:36: error: Library stubs not installed for "psycopg2" [import-untyped-stubs-available]
- zerver/lib/tex.py:6: error: Library stubs not installed for "lxml.html" [import-untyped]
+ zerver/lib/tex.py:6: error: Library stubs not installed for "lxml.html" [import-untyped-stubs-available]
- zerver/lib/tex.py:6: error: Library stubs not installed for "lxml" [import-untyped]
+ zerver/lib/tex.py:6: error: Library stubs not installed for "lxml" [import-untyped-stubs-available]
- zerver/lib/subscription_info.py:11: error: Library stubs not installed for "psycopg2.sql" [import-untyped]
+ zerver/lib/subscription_info.py:11: error: Library stubs not installed for "psycopg2.sql" [import-untyped-stubs-available]
- zerver/lib/markdown/fenced_code.py:83: error: Library stubs not installed for "lxml.html" [import-untyped]
+ zerver/lib/markdown/fenced_code.py:83: error: Library stubs not installed for "lxml.html" [import-untyped-stubs-available]
- zerver/lib/markdown/fenced_code.py:83: error: Library stubs not installed for "lxml" [import-untyped]
+ zerver/lib/markdown/fenced_code.py:83: error: Library stubs not installed for "lxml" [import-untyped-stubs-available]
- zerver/lib/markdown/fenced_code.py:89: error: Library stubs not installed for "pygments.lexers" [import-untyped]
+ zerver/lib/markdown/fenced_code.py:89: error: Library stubs not installed for "pygments.lexers" [import-untyped-stubs-available]
- zerver/lib/markdown/fenced_code.py:90: error: Library stubs not installed for "pygments.util" [import-untyped]
+ zerver/lib/markdown/fenced_code.py:90: error: Library stubs not installed for "pygments.util" [import-untyped-stubs-available]
- zerver/lib/markdown/__init__.py:20: error: Library stubs not installed for "lxml.etree" [import-untyped]
+ zerver/lib/markdown/__init__.py:20: error: Library stubs not installed for "lxml.etree" [import-untyped-stubs-available]
- zerver/lib/markdown/__init__.py:20: error: Library stubs not installed for "lxml" [import-untyped]
+ zerver/lib/markdown/__init__.py:20: error: Library stubs not installed for "lxml" [import-untyped-stubs-available]
- zerver/lib/markdown/__init__.py:29: error: Library stubs not installed for "regex" [import-untyped]
+ zerver/lib/markdown/__init__.py:29: error: Library stubs not installed for "regex" [import-untyped-stubs-available]
- zerver/actions/presence.py:7: error: Library stubs not installed for "psycopg2" [import-untyped]
+ zerver/actions/presence.py:7: error: Library stubs not installed for "psycopg2" [import-untyped-stubs-available]
- zerver/lib/message.py:13: error: Library stubs not installed for "psycopg2.sql" [import-untyped]
+ zerver/lib/message.py:13: error: Library stubs not installed for "psycopg2.sql" [import-untyped-stubs-available]
- zerver/lib/email_notifications.py:15: error: Library stubs not installed for "lxml.html" [import-untyped]
+ zerver/lib/email_notifications.py:15: error: Library stubs not installed for "lxml.html" [import-untyped-stubs-available]
- zerver/lib/email_notifications.py:15: error: Library stubs not installed for "lxml" [import-untyped]
+ zerver/lib/email_notifications.py:15: error: Library stubs not installed for "lxml" [import-untyped-stubs-available]
- zerver/lib/push_notifications.py:14: error: Library stubs not installed for "lxml.html" [import-untyped]
+ zerver/lib/push_notifications.py:14: error: Library stubs not installed for "lxml.html" [import-untyped-stubs-available]
- zerver/lib/push_notifications.py:14: error: Library stubs not installed for "lxml" [import-untyped]
+ zerver/lib/push_notifications.py:14: error: Library stubs not installed for "lxml" [import-untyped-stubs-available]
- zproject/backends.py:41: error: Library stubs not installed for "lxml.etree" [import-untyped]
+ zproject/backends.py:41: error: Library stubs not installed for "lxml.etree" [import-untyped-stubs-available]
- zproject/backends.py:70: error: Library stubs not installed for "zxcvbn" [import-untyped]
+ zproject/backends.py:70: error: Library stubs not installed for "zxcvbn" [import-untyped-stubs-available]
- zerver/actions/invites.py:12: error: Library stubs not installed for "zxcvbn" [import-untyped]
+ zerver/actions/invites.py:12: error: Library stubs not installed for "zxcvbn" [import-untyped-stubs-available]
- zerver/views/video_calls.py:9: error: Library stubs not installed for "defusedxml" [import-untyped]
+ zerver/views/video_calls.py:9: error: Library stubs not installed for "defusedxml" [import-untyped-stubs-available]
- zerver/views/video_calls.py:20: error: Library stubs not installed for "oauthlib.oauth2" [import-untyped]
+ zerver/views/video_calls.py:20: error: Library stubs not installed for "oauthlib.oauth2" [import-untyped-stubs-available]
- zerver/views/video_calls.py:22: error: Library stubs not installed for "requests_oauthlib" [import-untyped]
+ zerver/views/video_calls.py:22: error: Library stubs not installed for "requests_oauthlib" [import-untyped-stubs-available]
- zerver/views/documentation.py:15: error: Library stubs not installed for "lxml" [import-untyped]
+ zerver/views/documentation.py:15: error: Library stubs not installed for "lxml" [import-untyped-stubs-available]
- zerver/views/documentation.py:16: error: Library stubs not installed for "lxml.etree" [import-untyped]
+ zerver/views/documentation.py:16: error: Library stubs not installed for "lxml.etree" [import-untyped-stubs-available]
- zerver/lib/test_classes.py:16: error: Library stubs not installed for "lxml.html" [import-untyped]
+ zerver/lib/test_classes.py:16: error: Library stubs not installed for "lxml.html" [import-untyped-stubs-available]
- zerver/lib/test_classes.py:16: error: Library stubs not installed for "lxml" [import-untyped]
+ zerver/lib/test_classes.py:16: error: Library stubs not installed for "lxml" [import-untyped-stubs-available]
- analytics/tests/test_counts.py:11: error: Library stubs not installed for "psycopg2.sql" [import-untyped]
+ analytics/tests/test_counts.py:11: error: Library stubs not installed for "psycopg2.sql" [import-untyped-stubs-available]
- zerver/webhooks/pivotal/view.py:7: error: Library stubs not installed for "defusedxml.ElementTree" [import-untyped]
+ zerver/webhooks/pivotal/view.py:7: error: Library stubs not installed for "defusedxml.ElementTree" [import-untyped-stubs-available]
- zerver/webhooks/openproject/view.py:1: error: Library stubs not installed for "regex" [import-untyped]
+ zerver/webhooks/openproject/view.py:1: error: Library stubs not installed for "regex" [import-untyped-stubs-available]
- zerver/tests/test_message_notification_emails.py:9: error: Library stubs not installed for "lxml.html" [import-untyped]
+ zerver/tests/test_message_notification_emails.py:9: error: Library stubs not installed for "lxml.html" [import-untyped-stubs-available]
- zerver/tests/test_message_notification_emails.py:9: error: Library stubs not installed for "lxml" [import-untyped]
+ zerver/tests/test_message_notification_emails.py:9: error: Library stubs not installed for "lxml" [import-untyped-stubs-available]
- zerver/migrations/0629_remove_stream_email_token_backfill_channelemailaddress.py:9: error: Library stubs not installed for "psycopg2.sql" [import-untyped]
+ zerver/migrations/0629_remove_stream_email_token_backfill_channelemailaddress.py:9: error: Library stubs not installed for "psycopg2.sql" [import-untyped-stubs-available]
- zerver/lib/import_realm.py:19: error: Library stubs not installed for "psycopg2.extras" [import-untyped]
... (truncated 13 lines) ...
strawberry (https://github.com/strawberry-graphql/strawberry)
- strawberry/exceptions/syntax.py:5: error: Library stubs not installed for "pygments.lexers" [import-untyped]
+ strawberry/exceptions/syntax.py:5: error: Library stubs not installed for "pygments.lexers" [import-untyped-stubs-available]
- strawberry/channels/handlers/base.py:13: error: Library stubs not installed for "channels.consumer" [import-untyped]
+ strawberry/channels/handlers/base.py:13: error: Library stubs not installed for "channels.consumer" [import-untyped-stubs-available]
- strawberry/channels/handlers/base.py:14: error: Library stubs not installed for "channels.generic.websocket" [import-untyped]
+ strawberry/channels/handlers/base.py:14: error: Library stubs not installed for "channels.generic.websocket" [import-untyped-stubs-available]
- strawberry/schema/types/base_scalars.py:7: error: Library stubs not installed for "dateutil.parser" [import-untyped]
+ strawberry/schema/types/base_scalars.py:7: error: Library stubs not installed for "dateutil.parser" [import-untyped-stubs-available]
- strawberry/schema/types/base_scalars.py:7: error: Library stubs not installed for "dateutil" [import-untyped]
+ strawberry/schema/types/base_scalars.py:7: error: Library stubs not installed for "dateutil" [import-untyped-stubs-available]
- strawberry/channels/testing.py:9: error: Library stubs not installed for "channels.testing.websocket" [import-untyped]
+ strawberry/channels/testing.py:9: error: Library stubs not installed for "channels.testing.websocket" [import-untyped-stubs-available]
- strawberry/channels/handlers/http_handler.py:12: error: Library stubs not installed for "channels.db" [import-untyped]
+ strawberry/channels/handlers/http_handler.py:12: error: Library stubs not installed for "channels.db" [import-untyped-stubs-available]
- strawberry/channels/handlers/http_handler.py:13: error: Library stubs not installed for "channels.generic.http" [import-untyped]
+ strawberry/channels/handlers/http_handler.py:13: error: Library stubs not installed for "channels.generic.http" [import-untyped-stubs-available]
- strawberry/channels/router.py:12: error: Library stubs not installed for "channels.routing" [import-untyped]
+ strawberry/channels/router.py:12: error: Library stubs not installed for "channels.routing" [import-untyped-stubs-available]
flake8 (https://github.com/pycqa/flake8)
- src/flake8/plugins/pyflakes.py:10: error: Library stubs not installed for "pyflakes.checker" [import-untyped]
+ src/flake8/plugins/pyflakes.py:10: error: Library stubs not installed for "pyflakes.checker" [import-untyped-stubs-available]
- src/flake8/plugins/pyflakes.py:10: error: Library stubs not installed for "pyflakes" [import-untyped]
+ src/flake8/plugins/pyflakes.py:10: error: Library stubs not installed for "pyflakes" [import-untyped-stubs-available]
- tests/unit/test_pyflakes_codes.py:6: error: Library stubs not installed for "pyflakes" [import-untyped]
+ tests/unit/test_pyflakes_codes.py:6: error: Library stubs not installed for "pyflakes" [import-untyped-stubs-available]
cki-lib (https://gitlab.com/cki-project/cki-lib)
- setup.py:5: error: Library stubs not installed for "setuptools" [import-untyped]
+ setup.py:5: error: Library stubs not installed for "setuptools" [import-untyped-stubs-available]
- cki_lib/psql.py:3: error: Library stubs not installed for "psycopg2" [import-untyped]
+ cki_lib/psql.py:3: error: Library stubs not installed for "psycopg2" [import-untyped-stubs-available]
- cki_lib/misc.py:24: error: Library stubs not installed for "dateutil.parser" [import-untyped]
+ cki_lib/misc.py:24: error: Library stubs not installed for "dateutil.parser" [import-untyped-stubs-available]
- cki_lib/yaml.py:14: error: Library stubs not installed for "jsonschema" [import-untyped]
+ cki_lib/yaml.py:14: error: Library stubs not installed for "jsonschema" [import-untyped-stubs-available]
- cki_lib/kcidb/validate.py:12: error: Library stubs not installed for "jsonschema" [import-untyped]
+ cki_lib/kcidb/validate.py:12: error: Library stubs not installed for "jsonschema" [import-untyped-stubs-available]
- cki_lib/cronjob.py:5: error: Library stubs not installed for "crontab" [import-untyped]
+ cki_lib/cronjob.py:5: error: Library stubs not installed for "crontab" [import-untyped-stubs-available]
- tests/test_psql.py:6: error: Library stubs not installed for "psycopg2" [import-untyped]
+ tests/test_psql.py:6: error: Library stubs not installed for "psycopg2" [import-untyped-stubs-available]
- cki_lib/krb_ticket_refresher.py:8: error: Library stubs not installed for "dateutil" [import-untyped]
+ cki_lib/krb_ticket_refresher.py:8: error: Library stubs not installed for "dateutil" [import-untyped-stubs-available]
- tests/kcidb/test_validate.py:8: error: Library stubs not installed for "jsonschema" [import-untyped]
+ tests/kcidb/test_validate.py:8: error: Library stubs not installed for "jsonschema" [import-untyped-stubs-available]
core (https://github.com/home-assistant/core)
+ homeassistant/components/systemmonitor/const.py:3: error: Library stubs not installed for "psutil" [import-untyped-stubs-available]
+ homeassistant/components/systemmonitor/const.py:3: note: Hint: "python3 -m pip install types-psutil"
+ homeassistant/components/modem_callerid/const.py:6: error: Library stubs not installed for "serial" [import-untyped-stubs-available]
+ homeassistant/components/mqtt/async_client.py:9: error: Library stubs not installed for "paho.mqtt.client" [import-untyped-stubs-available]
+ homeassistant/components/mqtt/async_client.py:9: note: Hint: "python3 -m pip install types-paho-mqtt"
+ homeassistant/components/slack/utils.py:5: error: Library stubs not installed for "aiofiles" [import-untyped-stubs-available]
+ homeassistant/components/recorder/util.py:386: error: Library stubs not installed for "MySQLdb.constants" [import-untyped-stubs-available]
+ homeassistant/components/recorder/util.py:386: note: Hint: "python3 -m pip install types-mysqlclient"
+ homeassistant/components/recorder/util.py:387: error: Library stubs not installed for "MySQLdb.converters" [import-untyped-stubs-available]
+ homeassistant/components/calendar/__init__.py:15: error: Library stubs not installed for "dateutil.rrule" [import-untyped-stubs-available]
+ homeassistant/components/usb/utils.py:10: error: Library stubs not installed for "serial.tools.list_ports" [import-untyped-stubs-available]
+ homeassistant/components/usb/utils.py:11: error: Library stubs not installed for "serial.tools.list_ports_common" [import-untyped-stubs-available]
+ homeassistant/components/zestimate/sensor.py:10: error: Library stubs not installed for "xmltodict" [import-untyped-stubs-available]
+ homeassistant/components/ted5000/sensor.py:11: error: Library stubs not installed for "xmltodict" [import-untyped-stubs-available]
+ homeassistant/components/systemmonitor/util.py:6: error: Library stubs not installed for "psutil._common" [import-untyped-stubs-available]
+ homeassistant/components/startca/sensor.py:12: error: Library stubs not installed for "xmltodict" [import-untyped-stubs-available]
+ homeassistant/components/serial/sensor.py:9: error: Library stubs not installed for "serial" [import-untyped-stubs-available]
+ homeassistant/components/route_b_smart_meter/config_flow.py:7: error: Library stubs not installed for "serial.tools.list_ports" [import-untyped-stubs-available]
+ homeassistant/components/route_b_smart_meter/config_flow.py:8: error: Library stubs not installed for "serial.tools.list_ports_common" [import-untyped-stubs-available]
+ homeassistant/components/rest/data.py:11: error: Library stubs not installed for "xmltodict" [import-untyped-stubs-available]
+ homeassistant/components/rainforest_raven/config_flow.py:11: error: Library stubs not installed for "serial.tools.list_ports" [import-untyped-stubs-available]
+ homeassistant/components/rainforest_raven/config_flow.py:11: error: Library stubs not installed for "serial.tools" [import-untyped-stubs-available]
+ homeassistant/components/rainforest_raven/config_flow.py:11: error: Library stubs not installed for "serial" [import-untyped-stubs-available]
+ homeassistant/components/rainforest_raven/config_flow.py:12: error: Library stubs not installed for "serial.tools.list_ports_common" [import-untyped-stubs-available]
+ homeassistant/components/profiler/__init__.py:170: error: Library stubs not installed for "objgraph" [import-untyped-stubs-available]
+ homeassistant/components/profiler/__init__.py:170: note: Hint: "python3 -m pip install types-objgraph"
+ homeassistant/components/opentherm_gw/__init__.py:8: error: Library stubs not installed for "serial" [import-untyped-stubs-available]
+ homeassistant/components/ohmconnect/sensor.py:8: error: Library stubs not installed for "defusedxml.ElementTree" [import-untyped-stubs-available]
+ homeassistant/components/ohmconnect/sensor.py:8: error: Library stubs not installed for "defusedxml" [import-untyped-stubs-available]
+ homeassistant/components/noaa_tides/sensor.py:35: error: Library stubs not installed for "pandas" [import-untyped-stubs-available]
+ homeassistant/components/noaa_tides/sensor.py:35: note: Hint: "python3 -m pip install pandas-stubs"
+ homeassistant/components/namecheapdns/__init__.py:6: error: Library stubs not installed for "defusedxml.ElementTree" [import-untyped-stubs-available]
+ homeassistant/components/namecheapdns/__init__.py:6: error: Library stubs not installed for "defusedxml" [import-untyped-stubs-available]
+ homeassistant/components/monoprice/media_player.py:5: error: Library stubs not installed for "serial" [import-untyped-stubs-available]
+ homeassistant/components/monoprice/config_flow.py:9: error: Library stubs not installed for "serial" [import-untyped-stubs-available]
+ homeassistant/components/monoprice/__init__.py:6: error: Library stubs not installed for "serial" [import-untyped-stubs-available]
+ homeassistant/components/modem_callerid/config_flow.py:8: error: Library stubs not installed for "serial.tools.list_ports" [import-untyped-stubs-available]
+ homeassistant/components/modem_callerid/config_flow.py:8: error: Library stubs not installed for "serial.tools" [import-untyped-stubs-available]
+ homeassistant/components/modem_callerid/config_flow.py:8: error: Library stubs not installed for "serial" [import-untyped-stubs-available]
+ homeassistant/components/modem_callerid/config_flow.py:9: error: Library stubs not installed for "serial.tools.list_ports_common" [import-untyped-stubs-available]
+ homeassistant/components/media_extractor/__init__.py:9: error: Library stubs not installed for "yt_dlp" [import-untyped-stubs-available]
+ homeassistant/components/media_extractor/__init__.py:10: error: Library stubs not installed for "yt_dlp.utils" [import-untyped-stubs-available]
+ homeassistant/components/media_extractor/__init__.py:10: note: Hint: "python3 -m pip install types-yt-dlp"
+ homeassistant/components/matrix/__init__.py:13: error: Library stubs not installed for "aiofiles.os" [import-untyped-stubs-available]
+ homeassistant/components/matrix/__init__.py:13: note: Hint: "python3 -m pip install types-aiofiles"
+ homeassistant/components/matrix/__init__.py:13: error: Library stubs not installed for "aiofiles" [import-untyped-stubs-available]
+ homeassistant/components/landisgyr_heat_meter/coordinator.py:6: error: Library stubs not installed for "serial" [import-untyped-stubs-available]
+ homeassistant/components/landisgyr_heat_meter/config_flow.py:9: error: Library stubs not installed for "serial" [import-untyped-stubs-available]
+ homeassistant/components/landisgyr_heat_meter/config_flow.py:10: error: Library stubs not installed for "serial.tools" [import-untyped-stubs-available]
+ homeassistant/components/lacrosse/sensor.py:10: error: Library stubs not installed for "serial" [import-untyped-stubs-available]
+ homeassistant/components/habitica/util.py:10: error: Library stubs not installed for "dateutil.rrule" [import-untyped-stubs-available]
+ homeassistant/components/google_assistant_sdk/helpers.py:15: error: Library stubs not installed for "grpc" [import-untyped-stubs-available]
+ homeassistant/components/google_assistant_sdk/helpers.py:15: note: Hint: "python3 -m pip install types-grpcio"
+ homeassistant/components/elv/switch.py:9: error: Library stubs not installed for "serial" [import-untyped-stubs-available]
+ homeassistant/components/cisco_ios/device_tracker.py:7: error: Library stubs not installed for "pexpect" [import-untyped-stubs-available]
+ homeassistant/components/blackbird/media_player.py:8: error: Library stubs not installed for "serial" [import-untyped-stubs-available]
+ homeassistant/components/aurora_abb_powerone/coordinator.py:7: error: Library stubs not installed for "serial" [import-untyped-stubs-available]
+ homeassistant/components/aurora_abb_powerone/config_flow.py:10: error: Library stubs not installed for "serial.tools.list_ports" [import-untyped-stubs-available]
+ homeassistant/components/aurora_abb_powerone/config_flow.py:10: error: Library stubs not installed for "serial.tools" [import-untyped-stubs-available]
+ homeassistant/components/aurora_abb_powerone/config_flow.py:10: error: Library stubs not installed for "serial" [import-untyped-stubs-available]
+ homeassistant/components/aruba/device_tracker.py:9: error: Library stubs not installed for "pexpect" [import-untyped-stubs-available]
+ homeassistant/components/aruba/device_tracker.py:9: note: Hint: "python3 -m pip install types-pexpect"
+ homeassistant/components/velbus/config_flow.py:7: error: Library stubs not installed for "serial.tools.list_ports" [import-untyped-stubs-available]
+ homeassistant/components/velbus/config_flow.py:7: error: Library stubs not installed for "serial.tools" [import-untyped-stubs-available]
+ homeassistant/components/velbus/config_flow.py:7: error: Library stubs not installed for "serial" [import-untyped-stubs-available]
+ homeassistant/components/systemmonitor/coordinator.py:11: error: Library stubs not installed for "psutil" [import-untyped-stubs-available]
+ homeassistant/components/systemmonitor/coordinator.py:12: error: Library stubs not installed for "psutil._common" [import-untyped-stubs-available]
+ homeassistant/components/sonos/speaker.py:14: error: Library stubs not installed for "defusedxml.ElementTree" [import-untyped-stubs-available]
+ homeassistant/components/sonos/speaker.py:14: error: Library stubs not installed for "defusedxml" [import-untyped-stubs-available]
+ homeassistant/components/opentherm_gw/config_flow.py:10: error: Library stubs not installed for "serial" [import-untyped-stubs-available]
+ homeassistant/components/nmap_tracker/__init__.py:14: error: Library stubs not installed for "nmap" [import-untyped-stubs-available]
+ homeassistant/components/nmap_tracker/__init__.py:14: note: Hint: "python3 -m pip install types-python-nmap"
+ homeassistant/components/litejet/config_flow.py:8: error: Library stubs not installed for "serial" [import-untyped-stubs-available]
+ homeassistant/components/insteon/utils.py:14: error: Library stubs not installed for "serial.tools" [import-untyped-stubs-available]
+ homeassistant/components/ihc/auto_setup.py:6: error: Library stubs not installed for "defusedxml" [import-untyped-stubs-available]
+ homeassistant/components/ihc/auto_setup.py:6: note: Hint: "python3 -m pip install types-defusedxml"
+ homeassistant/components/google_travel_time/sensor.py:20: error: Library stubs not installed for "google.protobuf" [import-untyped-stubs-available]
+ homeassistant/components/google_travel_time/sensor.py:20: note: Hint: "python3 -m pip install types-protobuf"
+ homeassistant/components/google_tasks/api.py:12: error: Library stubs not installed for "httplib2" [import-untyped-stubs-available]
+ homeassistant/components/google_tasks/api.py:12: note: Hint: "python3 -m pip install types-httplib2"
+ homeassistant/components/enocean/dongle.py:9: error: Library stubs not installed for "serial" [import-untyped-stubs-available]
+ homeassistant/components/dsmr/config_flow.py:17: error: Library stubs not installed for "serial" [import-untyped-stubs-available]
+ homeassistant/components/dsmr/config_flow.py:18: error: Library stubs not installed for "serial.tools.list_ports" [import-untyped-stubs-available]
+ homeassistant/components/dsmr/config_flow.py:18: error: Library stubs not installed for "serial.tools" [import-untyped-stubs-available]
+ homeassistant/components/crownstone/helpers.py:8: error: Library stubs not installed for "serial.tools.list_ports_common" [import-untyped-stubs-available]
+ homeassistant/components/airnow/sensor.py:9: error: Library stubs not installed for "dateutil" [import-untyped-stubs-available]
+ homeassistant/components/airnow/sensor.py:9: note: Hint: "python3 -m pip install types-python-dateutil"
+ homeassistant/components/acer_projector/switch.py:9: error: Library stubs not installed for "serial" [import-untyped-stubs-available]
+ homeassistant/components/acer_projector/switch.py:9: note: Hint: "python3 -m pip install types-pyserial"
+ homeassistant/components/acer_projector/switch.py:9: note: (or run "mypy --install-types" to install all missing stub packages)
+ homeassistant/components/acer_projector/switch.py:9: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
+ homeassistant/components/snmp/sensor.py:9: error: Library stubs not installed for "pyasn1.codec.ber" [import-untyped-stubs-available]
+ homeassistant/components/snmp/sensor.py:9: note: Hint: "python3 -m pip install types-pyasn1"
+ homeassistant/components/mqtt/models.py:29: error: Library stubs not installed for "paho.mqtt.client" [import-untyped-stubs-available]
+ homeassistant/components/mqtt/client.py:91: error: Library stubs not installed for "paho.mqtt.client" [import-untyped-stubs-available]
+ homeassistant/components/mqtt/client.py:91: error: Library stubs not installed for "paho.mqtt" [import-untyped-stubs-available]
+ homeassistant/components/mqtt/client.py:1320: error: Library stubs not installed for "paho.mqtt.matcher" [import-untyped-stubs-available]
+ homeassistant/components/dsmr/sensor.py:20: error: Library stubs not installed for "serial" [import-untyped-stubs-available]
+ homeassistant/components/zwave_js/config_flow.py:14: error: Library stubs not installed for "serial.tools" [import-untyped-stubs-available]
+ homeassistant/components/systemmonitor/sensor.py:17: error: Library stubs not installed for "psutil._common" [import-untyped-stubs-available]
+ homeassistant/components/rfxtrx/config_flow.py:13: error: Library stubs not installed for "serial" [import-untyped-stubs-available]
+ homeassistant/components/rfxtrx/config_flow.py:14: error: Library stubs not installed for "serial.tools.list_ports" [import-untyped-stubs-available]
+ homeassistant/components/rfxtrx/config_flow.py:14: error: Library stubs not installed for "serial.tools" [import-untyped-stubs-available]
+ homeassistant/components/rflink/__init__.py:10: error: Library stubs not installed for "serial" [import-untyped-stubs-available]
+ homeassistant/components/mqtt/config_flow.py:5079: error: Library stubs not installed for "paho.mqtt.client" [import-untyped-stubs-available]
+ homeassistant/components/mqtt/config_flow.py:5079: error: Library stubs not installed for "paho.mqtt" [import-untyped-stubs-available]
+ homeassistant/components/habitica/calendar.py:12: error: Library stubs not installed for "dateutil.rrule" [import-untyped-stubs-available]
+ homeassistant/components/fritz/coordinator.py:24: error: Library stubs not installed for "xmltodict" [import-untyped-stubs-available]
+ homeassistant/components/fritz/coordinator.py:24: note: Hint: "python3 -m pip install types-xmltodict"
+ homeassistant/components/crownstone/config_flow.py:13: error: Library stubs not installed for "serial.tools.list_ports" [import-untyped-stubs-available]
+ homeassistant/components/crownstone/config_flow.py:13: error: Library stubs not installed for "serial.tools" [import-untyped-stubs-available]
+ homeassistant/components/crownstone/config_flow.py:13: error: Library stubs not installed for "serial" [import-untyped-stubs-available]
+ homeassistant/components/crownstone/config_flow.py:14: error: Library stubs not installed for "serial.tools.list_ports_common" [import-untyped-stubs-available]
sphinx (https://github.com/sphinx-doc/sphinx)
- sphinx/pygments_styles.py:5:1: error: Library stubs not installed for "pygments.style" [import-untyped]
+ sphinx/pygments_styles.py:5:1: error: Library stubs not installed for "pygments.style" [import-untyped-stubs-available]
- sphinx/pygments_styles.py:6:1: error: Library stubs not installed for "pygments.styles.friendly" [import-untyped]
+ sphinx/pygments_styles.py:6:1: error: Library stubs not installed for "pygments.styles.friendly" [import-untyped-stubs-available]
- sphinx/pygments_styles.py:7:1: error: Library stubs not installed for "pygments.token" [import-untyped]
+ sphinx/pygments_styles.py:7:1: error: Library stubs not installed for "pygments.token" [import-untyped-stubs-available]
- sphinx/_cli/util/errors.py:102:1: error: Library stubs not installed for "pygments" [import-untyped]
+ sphinx/_cli/util/errors.py:102:1: error: Library stubs not installed for "pygments" [import-untyped-stubs-available]
- sphinx/highlighting.py:9:1: error: Library stubs not installed for "pygments" [import-untyped]
+ sphinx/highlighting.py:9:1: error: Library stubs not installed for "pygments" [import-untyped-stubs-available]
- sphinx/highlighting.py:11:1: error: Library stubs not installed for "pygments.filters" [import-untyped]
+ sphinx/highlighting.py:11:1: error: Library stubs not installed for "pygments.filters" [import-untyped-stubs-available]
- sphinx/highlighting.py:12:1: error: Library stubs not installed for "pygments.formatters" [import-untyped]
+ sphinx/highlighting.py:12:1: error: Library stubs not installed for "pygments.formatters" [import-untyped-stubs-available]
- sphinx/highlighting.py:13:1: error: Library stubs not installed for "pygments.lexers" [import-untyped]
+ sphinx/highlighting.py:13:1: error: Library stubs not installed for "pygments.lexers" [import-untyped-stubs-available]
- sphinx/highlighting.py:22:1: error: Library stubs not installed for "pygments.styles" [import-untyped]
+ sphinx/highlighting.py:22:1: error: Library stubs not installed for "pygments.styles" [import-untyped-stubs-available]
- sphinx/highlighting.py:23:1: error: Library stubs not installed for "pygments.util" [import-untyped]
+ sphinx/highlighting.py:23:1: error: Library stubs not installed for "pygments.util" [import-untyped-stubs-available]
- sphinx/highlighting.py:32:1: error: Library stubs not installed for "pygments.formatter" [import-untyped]
+ sphinx/highlighting.py:32:1: error: Library stubs not installed for "pygments.formatter" [import-untyped-stubs-available]
- sphinx/highlighting.py:33:1: error: Library stubs not installed for "pygments.lexer" [import-untyped]
+ sphinx/highlighting.py:33:1: error: Library stubs not installed for "pygments.lexer" [import-untyped-stubs-available]
- sphinx/highlighting.py:34:1: error: Library stubs not installed for "pygments.style" [import-untyped]
+ sphinx/highlighting.py:34:1: error: Library stubs not installed for "pygments.style" [import-untyped-stubs-available]
- sphinx/application.py:48:1: error: Library stubs not installed for "pygments.lexer" [import-untyped]
+ sphinx/application.py:48:1: error: Library stubs not installed for "pygments.lexer" [import-untyped-stubs-available]
- sphinx/testing/util.py:81:1: error: Library stubs not installed for "defusedxml.ElementTree" [import-untyped]
+ sphinx/testing/util.py:81:1: error: Library stubs not installed for "defusedxml.ElementTree" [import-untyped-stubs-available]
- sphinx/cmd/build.py:460:1: error: Library stubs not installed for "pygments" [import-untyped]
... (truncated 223 lines) ...``` |
Fixes #18661. Please see that issue for discussion and justification. However, briefly: import-untyped-stubs-available is now a new error, so that it can be enabled while import-untyped is left disabled, so users can be made aware of available type stubs to improve their typing. As I said over there:
This also meant I noticed that lxml-stubs exists, and — in order to pass the self-check — fixed the code that assumed its typing wouldn't exist. An early success story for this new code!
Please note that there should be a mention of this in the release notes, probably, because projects will get many more errors after (errors which will be trivial to deal with).
Beyond the scope of this PR, unless someone authoritatively tells me what to do with them (otherwise they just get to be their own issues/PRs later):
This should also allow us to resolve Improving and evolving stub package suggestions #10619, although I haven't touched that system and this only lays the groundwork for a resolution.
I'm looking at https://github.com/lxml/lxml-stubs right now and it suggests lxml-types, suggesting that maybe we should require that for mypy test-requirements instead. (Edit: someone else later made an issue about the first half of this: Consider recommending types-lxml instead of lxml-stubs in import-untyped hint #20187. If this PR gets merged before that, then just mention how the change would likely mean changing this dependency as well, over there.)
Working on this PR made me realize that several pieces of the documentation I was working within were inelegant or inaccurate. I'm working on revising them, but for my own sanity I have decided that will be a subsequent PR instead of part of this one. (I've sort of forgotten what I was talking about here (I'm sure it's safe and sound in a branch I have somewhere), but I think this is an example I found when grepping about:
like, what the heck?)
Do we actually have any test coverage of not having lxml installed, on purpose? I think so far we only do it by accident when lxml doesn't support a python version yet, which is why I was able to get so far with a mistaken refactor that assumed it would exist — lxml is installed in the test requirements (naturally, in order to be able to test those features).
I would like to have a test case for a purely vanilla import-untyped without a 3rd party package nor a namespace package, but we don't seem to have one already and I couldn't figure out how to trigger this.