Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Delay errors in semanal for proper unreachability information#20425

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
A5rocks wants to merge6 commits intopython:master
base:master
Choose a base branch
Loading
fromA5rocks:semanal-errors

Conversation

@A5rocks
Copy link
Collaborator

@A5rocksA5rocks commentedDec 16, 2025
edited
Loading

This is a draft PR because:

  • it doesn't work with dmypy
  • it's a bit slower:
=== Results ===master                    2.697s (0.0%) | stdev 0.012sf18e550f23d30c454a0f6fc2c8b41eb9e03b4f29 2.732s (+1.3%) | stdev 0.018s

@A5rocks
Copy link
CollaboratorAuthor

Idea for a speedup (so I don't forget): only do this for things that can be skipped unreachable (I.e. stmts in a block, toplevel stmts).

Also note that I haven't cleaned this up, which would involve removing eg theassert False special case and adding a test case for the issue this fixes.

@github-actions

This comment has been minimized.

Note that there are a few places where unreachable code can happen where this still doesn't help. I'm not sure what to do about them.
@A5rocks
Copy link
CollaboratorAuthor

A5rocks commentedDec 17, 2025
edited
Loading

I made the changes I thought would help but this is still slow:

=== Results ===master                    2.722s (0.0%) | stdev 0.030s806266c53875d8891cfeff412e75dafbd33faa30 2.757s (+1.3%) | stdev 0.032sTotal time taken by the whole benchmarking program (including any setup): 4 minutes, 18 seconds

I suppose this is just going to be slow no matter what...

Second run with better stdev (still slower):

=== Results ===master                    2.700s (0.0%) | stdev 0.015s806266c53875d8891cfeff412e75dafbd33faa30 2.732s (+1.2%) | stdev 0.020sTotal time taken by the whole benchmarking program (including any setup): 4 minutes, 29 seconds

@github-actions

This comment has been minimized.

@A5rocks
Copy link
CollaboratorAuthor

Now it's slightly faster:

=== Results ===master                    2.707s (0.0%) | stdev 0.012s67abbb30                  2.722s (+0.6%) | stdev 0.028sTotal time taken by the whole benchmarking program (including any setup): 4 minutes, 22 seconds

I'm going to assume that's an acceptable slowdown. If not, I'm out of ideas on how to make it faster. I still have to clean this PR up and add test cases, but I will mark it as ready for review because the logic is finished! (I haven't put aside the time to look at dmypy yet...)


mypy_primer looks fine except the unreachability thing, I also need to check that out.

@A5rocksA5rocks marked this pull request as ready for reviewDecember 19, 2025 03:08
@github-actions

This comment has been minimized.

@github-actions
Copy link
Contributor

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

strawberry (https://github.com/strawberry-graphql/strawberry)+ strawberry/relay/types.py:846: error: Unused "type: ignore" comment  [unused-ignore]comtypes (https://github.com/enthought/comtypes)- comtypes/test/test_server.py:326: error: Module "comtypes.gen" has no attribute "TestLib"  [attr-defined]egglog-python (https://github.com/egraphs-good/egglog-python)+ python/tests/test_unstable_fn.py:177: error: Unused "type: ignore" comment  [unused-ignore]Expression (https://github.com/cognitedata/Expression)- README.py:498: error: Name "z" already defined on line 496  [no-redef]- README.py:572: error: Name "z" already defined on line 570  [no-redef]- README.py:628: error: Name "xs" already defined on line 211  [no-redef]- README.py:632: error: Name "mapper" already defined on line 207  [no-redef]- README.py:633: error: Name "predicate" already defined on line 208  [no-redef]- README.py:634: error: Name "folder" already defined on line 209  [no-redef]AutoSplit (https://github.com/Toufool/AutoSplit)- src/utils.py:147:12: error: Name "win32ui" is not defined  [name-defined]- src/utils.py:155:29: error: Name "ctypes" is not defined  [name-defined]- src/utils.py:156:5: error: Name "ctypes" is not defined  [name-defined]- src/utils.py:159:9: error: Name "ctypes" is not defined  [name-defined]- src/utils.py:160:9: error: Name "ctypes" is not defined  [name-defined]- src/utils.py:163:19: error: Name "win32gui" is not defined  [name-defined]- src/utils.py:176:20: error: Name "FilterGraph" is not defined  [name-defined]- src/utils.py:182:12: error: Name "COMError" is not defined  [name-defined]

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

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

unexpected attr-defined error in imports in dead code Platform check is not remembered afterreturn

1 participant

@A5rocks

[8]ページ先頭

©2009-2025 Movatter.jp