-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Make notes default to None code #19876
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
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Probably the key to mopping up the rest is to make notes inherit code if they are attached to something... (Wait... doesn't that already happen? Hmm...) |
… as a special case
…ve later as a special case" This reverts commit fa2e72b.
This comment has been minimized.
This comment has been minimized.
for more information, see https://pre-commit.ci
This comment has been minimized.
This comment has been minimized.
this is found in mypy_primer's corpus, but wasn't in our local tests. This covers silencing associated notes
This reverts commit 18ca5cf. This will allow the PR that fixes this problem to be more focused.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I suspect these plugins aren't parenting their notes, and are instead just generating notes as well as errors for the same line, which means changing the default type of notes would be a slight backwards compatibility issue, for basically no benefit (although, little downside, either). I need to investigate this more, though. |
Diff from mypy_primer, showing the effect of this PR on open source code: django-stubs (https://github.com/typeddjango/django-stubs)
+ django-stubs/db/models/enums.pyi:41: note: See https://typing.readthedocs.io/en/latest/spec/enums.html#defining-members
+ django-stubs/db/models/enums.pyi:61: note: See https://typing.readthedocs.io/en/latest/spec/enums.html#defining-members
+ django-stubs/db/models/enums.pyi:77: note: See https://typing.readthedocs.io/en/latest/spec/enums.html#defining-members
AutoSplit (https://github.com/Toufool/AutoSplit)
- File "/tmp/mypy_primer/mypy_old/venv/bin/mypy", line 7, in <module>
+ File "/tmp/mypy_primer/mypy_new/venv/bin/mypy", line 7, in <module>
- File "/tmp/mypy_primer/mypy_old/venv/lib/python3.13/site-packages/mypy/__main__.py", line 15, in console_entry
+ File "/tmp/mypy_primer/mypy_new/venv/lib/python3.13/site-packages/mypy/__main__.py", line 15, in console_entry
- File "/tmp/mypy_primer/mypy_old/venv/lib/python3.13/site-packages/mypy/main.py", line 127, in main
+ File "/tmp/mypy_primer/mypy_new/venv/lib/python3.13/site-packages/mypy/main.py", line 127, in main
- File "/tmp/mypy_primer/mypy_old/venv/lib/python3.13/site-packages/mypy/main.py", line 211, in run_build
+ File "/tmp/mypy_primer/mypy_new/venv/lib/python3.13/site-packages/mypy/main.py", line 211, in run_build
- File "/tmp/mypy_primer/mypy_old/venv/lib/python3.13/site-packages/mypy/build.py", line 196, in build
+ File "/tmp/mypy_primer/mypy_new/venv/lib/python3.13/site-packages/mypy/build.py", line 196, in build
- File "/tmp/mypy_primer/mypy_old/venv/lib/python3.13/site-packages/mypy/build.py", line 272, in _build
+ File "/tmp/mypy_primer/mypy_new/venv/lib/python3.13/site-packages/mypy/build.py", line 272, in _build
- File "/tmp/mypy_primer/mypy_old/venv/lib/python3.13/site-packages/mypy/build.py", line 2946, in dispatch
+ File "/tmp/mypy_primer/mypy_new/venv/lib/python3.13/site-packages/mypy/build.py", line 2946, in dispatch
- File "/tmp/mypy_primer/mypy_old/venv/lib/python3.13/site-packages/mypy/build.py", line 3346, in process_graph
+ File "/tmp/mypy_primer/mypy_new/venv/lib/python3.13/site-packages/mypy/build.py", line 3346, in process_graph
- File "/tmp/mypy_primer/mypy_old/venv/lib/python3.13/site-packages/mypy/build.py", line 3475, in process_stale_scc
+ File "/tmp/mypy_primer/mypy_new/venv/lib/python3.13/site-packages/mypy/build.py", line 3475, in process_stale_scc
- File "/tmp/mypy_primer/mypy_old/venv/lib/python3.13/site-packages/mypy/build.py", line 2493, in write_cache
+ File "/tmp/mypy_primer/mypy_new/venv/lib/python3.13/site-packages/mypy/build.py", line 2493, in write_cache
- File "/tmp/mypy_primer/mypy_old/venv/lib/python3.13/site-packages/mypy/cache.py", line 28, in __init__
+ File "/tmp/mypy_primer/mypy_new/venv/lib/python3.13/site-packages/mypy/cache.py", line 28, in __init__
|
Fix issue where ignore misc ignores reveal_type. Fixes #19840.
Since everything defaults to a code of misc, many notes with no code actually have code of misc...