Skip to content
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

In error messages, quote just the module's name #14567

Merged
merged 1 commit into from
Jan 31, 2023

Conversation

ikonst
Copy link
Contributor

@ikonst ikonst commented Jan 31, 2023

This makes it consistent with other error messages, e.g.

mypy/mypy/semanal.py

Lines 2572 to 2574 in 1a781e7

message = (
f'Module "{import_id}" does not explicitly export attribute "{source_id}"'
)

@github-actions

This comment has been minimized.

@ikonst ikonst force-pushed the 2023-01-31-module-quote branch from a35f4b6 to 3c995b3 Compare January 31, 2023 16:13
@github-actions
Copy link
Contributor

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

Tanjun (https://github.com/FasterSpeeding/Tanjun)
- version: 1.0.0+dev.1a781e7b46fa362718259187ca1f7cdfd9fad136
+ version: 1.0.0+dev.a5d3de22febda4d3e24093558cfc4ea5c51a001a

streamlit (https://github.com/streamlit/streamlit)
- lib/tests/streamlit/watcher/local_sources_watcher_test.py:232:13: error: "Module streamlit.watcher.local_sources_watcher" does not explicitly export attribute "get_default_path_watcher_class"  [attr-defined]
+ lib/tests/streamlit/watcher/local_sources_watcher_test.py:232:13: error: Module "streamlit.watcher.local_sources_watcher" does not explicitly export attribute "get_default_path_watcher_class"  [attr-defined]
- lib/tests/streamlit/watcher/local_sources_watcher_test.py:238:13: error: "Module streamlit.watcher.local_sources_watcher" does not explicitly export attribute "get_default_path_watcher_class"  [attr-defined]
+ lib/tests/streamlit/watcher/local_sources_watcher_test.py:238:13: error: Module "streamlit.watcher.local_sources_watcher" does not explicitly export attribute "get_default_path_watcher_class"  [attr-defined]
- lib/tests/streamlit/watcher/local_sources_watcher_test.py:244:13: error: "Module streamlit.watcher.local_sources_watcher" does not explicitly export attribute "get_default_path_watcher_class"  [attr-defined]
+ lib/tests/streamlit/watcher/local_sources_watcher_test.py:244:13: error: Module "streamlit.watcher.local_sources_watcher" does not explicitly export attribute "get_default_path_watcher_class"  [attr-defined]
- lib/tests/streamlit/watcher/local_sources_watcher_test.py:249:30: error: "Module streamlit.watcher.local_sources_watcher" does not explicitly export attribute "get_default_path_watcher_class"  [attr-defined]
+ lib/tests/streamlit/watcher/local_sources_watcher_test.py:249:30: error: Module "streamlit.watcher.local_sources_watcher" does not explicitly export attribute "get_default_path_watcher_class"  [attr-defined]
- lib/tests/streamlit/watcher/local_sources_watcher_test.py:253:17: error: "Module streamlit.watcher.local_sources_watcher" does not explicitly export attribute "get_default_path_watcher_class"  [attr-defined]
+ lib/tests/streamlit/watcher/local_sources_watcher_test.py:253:17: error: Module "streamlit.watcher.local_sources_watcher" does not explicitly export attribute "get_default_path_watcher_class"  [attr-defined]
- lib/tests/streamlit/web/server/server_test.py:337:42: error: "Module streamlit.config" does not explicitly export attribute "ConfigOption"  [attr-defined]
+ lib/tests/streamlit/web/server/server_test.py:337:42: error: Module "streamlit.config" does not explicitly export attribute "ConfigOption"  [attr-defined]

urllib3 (https://github.com/urllib3/urllib3)
- docs/conf.py:57: error: "Module urllib3" does not explicitly export attribute "__version__"  [attr-defined]
+ docs/conf.py:57: error: Module "urllib3" does not explicitly export attribute "__version__"  [attr-defined]

@JelleZijlstra JelleZijlstra merged commit 90168b8 into python:master Jan 31, 2023
@ikonst ikonst deleted the 2023-01-31-module-quote branch January 31, 2023 19:31
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