Skip to content

Conversation

MichaReiser
Copy link
Member

@MichaReiser MichaReiser commented Apr 3, 2025

Summary

As discussed in astral-sh/ty#160 and "mitigate" said issue for the alpha.

This PR changes the default for PythonPlatform to be the current platform rather than all.

I'm not sure if we should be as sophisticated as supporting ios and android as defaults but it was easy...

Test Plan

Some mdtests started failing because they now defaulted to darwin.

@MichaReiser MichaReiser added the ty Multi-file analysis & type inference label Apr 3, 2025
Copy link
Contributor

github-actions bot commented Apr 3, 2025

mypy_primer results

Changes were detected when running on open source projects
packaging (https://github.com/pypa/packaging)
- warning[lint:possibly-unbound-attribute] /tmp/mypy_primer/projects/packaging/src/packaging/_manylinux.py:95:38: Attribute `confstr` on type `<module 'os'>` is possibly unbound
- Found 349 diagnostics
+ Found 348 diagnostics

async-utils (https://github.com/mikeshardmind/async-utils)
- warning[lint:possibly-unbound-attribute] /tmp/mypy_primer/projects/async-utils/src/async_utils/sig_service.py:128:21: Attribute `siginterrupt` on type `<module 'signal'>` is possibly unbound
- Found 39 diagnostics
+ Found 38 diagnostics

werkzeug (https://github.com/pallets/werkzeug)
+ error[lint:unresolved-attribute] /tmp/mypy_primer/projects/werkzeug/src/werkzeug/debug/__init__.py:106:22: Type `<module 'winreg'>` has no attribute `OpenKey`
+ error[lint:unresolved-attribute] /tmp/mypy_primer/projects/werkzeug/src/werkzeug/debug/__init__.py:107:21: Type `<module 'winreg'>` has no attribute `HKEY_LOCAL_MACHINE`
+ error[lint:unresolved-attribute] /tmp/mypy_primer/projects/werkzeug/src/werkzeug/debug/__init__.py:110:21: Type `<module 'winreg'>` has no attribute `KEY_READ`
+ error[lint:unresolved-attribute] /tmp/mypy_primer/projects/werkzeug/src/werkzeug/debug/__init__.py:110:39: Type `<module 'winreg'>` has no attribute `KEY_WOW64_64KEY`
+ error[lint:unresolved-attribute] /tmp/mypy_primer/projects/werkzeug/src/werkzeug/debug/__init__.py:114:39: Type `<module 'winreg'>` has no attribute `QueryValueEx`
+ error[lint:unresolved-attribute] /tmp/mypy_primer/projects/werkzeug/src/werkzeug/debug/__init__.py:114:39: Type `<module 'winreg'>` has no attribute `QueryValueEx`
+ error[lint:unresolved-attribute] /tmp/mypy_primer/projects/werkzeug/src/werkzeug/debug/__init__.py:114:39: Type `<module 'winreg'>` has no attribute `QueryValueEx`
+ error[lint:unresolved-attribute] /tmp/mypy_primer/projects/werkzeug/src/werkzeug/debug/__init__.py:116:37: Type `<module 'winreg'>` has no attribute `REG_SZ`
- warning[lint:possibly-unbound-attribute] /tmp/mypy_primer/projects/werkzeug/src/werkzeug/_reloader.py:435:18: Attribute `tcgetattr` on type `<module 'termios'>` is possibly unbound
- warning[lint:possibly-unbound-attribute] /tmp/mypy_primer/projects/werkzeug/src/werkzeug/_reloader.py:437:28: Attribute `ECHO` on type `<module 'termios'>` is possibly unbound
- warning[lint:possibly-unbound-attribute] /tmp/mypy_primer/projects/werkzeug/src/werkzeug/_reloader.py:438:26: Attribute `ECHO` on type `<module 'termios'>` is possibly unbound
- warning[lint:possibly-unbound-attribute] /tmp/mypy_primer/projects/werkzeug/src/werkzeug/_reloader.py:439:9: Attribute `tcsetattr` on type `<module 'termios'>` is possibly unbound
- warning[lint:possibly-unbound-attribute] /tmp/mypy_primer/projects/werkzeug/src/werkzeug/_reloader.py:439:38: Attribute `TCSANOW` on type `<module 'termios'>` is possibly unbound
- warning[lint:possibly-unbound-attribute] /tmp/mypy_primer/projects/werkzeug/src/werkzeug/debug/__init__.py:106:22: Attribute `OpenKey` on type `<module 'winreg'>` is possibly unbound
- warning[lint:possibly-unbound-attribute] /tmp/mypy_primer/projects/werkzeug/src/werkzeug/debug/__init__.py:107:21: Attribute `HKEY_LOCAL_MACHINE` on type `<module 'winreg'>` is possibly unbound
- warning[lint:possibly-unbound-attribute] /tmp/mypy_primer/projects/werkzeug/src/werkzeug/debug/__init__.py:110:21: Attribute `KEY_READ` on type `<module 'winreg'>` is possibly unbound
- warning[lint:possibly-unbound-attribute] /tmp/mypy_primer/projects/werkzeug/src/werkzeug/debug/__init__.py:110:39: Attribute `KEY_WOW64_64KEY` on type `<module 'winreg'>` is possibly unbound
- warning[lint:possibly-unbound-attribute] /tmp/mypy_primer/projects/werkzeug/src/werkzeug/debug/__init__.py:114:39: Attribute `QueryValueEx` on type `<module 'winreg'>` is possibly unbound
- warning[lint:possibly-unbound-attribute] /tmp/mypy_primer/projects/werkzeug/src/werkzeug/debug/__init__.py:114:39: Attribute `QueryValueEx` on type `<module 'winreg'>` is possibly unbound
- warning[lint:possibly-unbound-attribute] /tmp/mypy_primer/projects/werkzeug/src/werkzeug/debug/__init__.py:114:39: Attribute `QueryValueEx` on type `<module 'winreg'>` is possibly unbound
- warning[lint:possibly-unbound-attribute] /tmp/mypy_primer/projects/werkzeug/src/werkzeug/debug/__init__.py:116:37: Attribute `REG_SZ` on type `<module 'winreg'>` is possibly unbound
- warning[lint:possibly-unbound-attribute] /tmp/mypy_primer/projects/werkzeug/tests/conftest.py:27:35: Attribute `AF_UNIX` on type `<module 'socket'>` is possibly unbound
- warning[lint:possibly-unbound-attribute] /tmp/mypy_primer/projects/werkzeug/src/werkzeug/serving.py:69:20: Attribute `ForkingMixIn` on type `<module 'socketserver'>` is possibly unbound
- warning[lint:possibly-unbound-attribute] /tmp/mypy_primer/projects/werkzeug/src/werkzeug/serving.py:77:15: Attribute `AF_UNIX` on type `<module 'socket'>` is possibly unbound
- warning[lint:possibly-unbound-attribute] /tmp/mypy_primer/projects/werkzeug/src/werkzeug/serving.py:659:16: Attribute `AF_UNIX` on type `<module 'socket'>` is possibly unbound
- Found 779 diagnostics
+ Found 770 diagnostics

pyinstrument (https://github.com/joerick/pyinstrument)
+ error[lint:unresolved-attribute] /tmp/mypy_primer/projects/pyinstrument/pyinstrument/vendor/appdirs.py:515:5: Type `<module 'ctypes'>` has no attribute `windll`
+ error[lint:unresolved-attribute] /tmp/mypy_primer/projects/pyinstrument/pyinstrument/vendor/appdirs.py:526:12: Type `<module 'ctypes'>` has no attribute `windll`
+ error[lint:unresolved-import] /tmp/mypy_primer/projects/pyinstrument/pyinstrument/vendor/appdirs.py:559:28: Module `ctypes` has no member `windll`
- warning[lint:possibly-unbound-attribute] /tmp/mypy_primer/projects/pyinstrument/pyinstrument/vendor/appdirs.py:515:5: Attribute `windll` on type `<module 'ctypes'>` is possibly unbound
- warning[lint:possibly-unbound-attribute] /tmp/mypy_primer/projects/pyinstrument/pyinstrument/vendor/appdirs.py:526:12: Attribute `windll` on type `<module 'ctypes'>` is possibly unbound
- warning[lint:possibly-unbound-import] /tmp/mypy_primer/projects/pyinstrument/pyinstrument/vendor/appdirs.py:559:28: Member `windll` of module `ctypes` is possibly unbound

mypy_primer (https://github.com/hauntsaninja/mypy_primer)
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/mypy_primer/mypy_primer/utils.py:33:24: Name `ILLEGAL_PATH_CHARS` used when possibly not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/mypy_primer/mypy_primer/utils.py:33:24: Name `ILLEGAL_PATH_CHARS` used when not defined

rich (https://github.com/Textualize/rich)
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:31:17: Name `WindowsCoordinates` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:31:47: Name `WindowsCoordinates` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:38:32: Name `_win32_console` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:44:34: Name `CURSOR_SIZE` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:48:13: Name `_win32_console` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:50:26: Name `StubScreenBufferInfo` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:52:13: Name `_win32_console` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:60:16: Name `LegacyWindowsTerm` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:61:40: Name `WindowsCoordinates` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:61:63: Name `CURSOR_Y` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:61:77: Name `CURSOR_X` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:64:16: Name `LegacyWindowsTerm` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:65:36: Name `WindowsCoordinates` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:66:17: Name `SCREEN_HEIGHT` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:66:36: Name `SCREEN_WIDTH` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:71:16: Name `LegacyWindowsTerm` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:87:16: Name `LegacyWindowsTerm` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:103:47: Name `DEFAULT_STYLE_ATTRIBUTE` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:111:16: Name `LegacyWindowsTerm` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:128:16: Name `LegacyWindowsTerm` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:145:16: Name `LegacyWindowsTerm` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:162:16: Name `LegacyWindowsTerm` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:179:16: Name `LegacyWindowsTerm` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:200:16: Name `LegacyWindowsTerm` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:202:17: Name `WindowsCoordinates` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:202:40: Name `CURSOR_Y` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:204:39: Name `SCREEN_WIDTH` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:207:27: Name `DEFAULT_STYLE_ATTRIBUTE` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:207:59: Name `SCREEN_WIDTH` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:218:16: Name `LegacyWindowsTerm` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:222:39: Name `SCREEN_WIDTH` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:222:54: Name `CURSOR_X` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:222:70: Name `CURSOR_POSITION` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:226:13: Name `DEFAULT_STYLE_ATTRIBUTE` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:227:20: Name `SCREEN_WIDTH` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:227:35: Name `CURSOR_X` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:228:19: Name `CURSOR_POSITION` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:239:16: Name `LegacyWindowsTerm` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:242:17: Name `WindowsCoordinates` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:242:36: Name `CURSOR_Y` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:245:39: Name `CURSOR_X` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:248:27: Name `DEFAULT_STYLE_ATTRIBUTE` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:248:59: Name `CURSOR_X` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:255:18: Name `WindowsCoordinates` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:256:16: Name `LegacyWindowsTerm` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:266:18: Name `WindowsCoordinates` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:267:16: Name `LegacyWindowsTerm` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:277:18: Name `WindowsCoordinates` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:278:16: Name `LegacyWindowsTerm` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:288:16: Name `LegacyWindowsTerm` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:293:34: Name `WindowsCoordinates` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:293:57: Name `CURSOR_Y` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:293:75: Name `CURSOR_X` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:300:16: Name `LegacyWindowsTerm` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:305:34: Name `WindowsCoordinates` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:305:57: Name `CURSOR_Y` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:305:75: Name `CURSOR_X` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:312:16: Name `LegacyWindowsTerm` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:317:34: Name `WindowsCoordinates` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:317:57: Name `CURSOR_Y` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:317:71: Name `CURSOR_X` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:324:33: Name `StubScreenBufferInfo` used when possibly not defined
- error[lint:unknown-argument] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:325:13: Argument `dwCursorPosition` does not match any known parameter of bound method `__init__`
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:325:30: Name `COORD` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:325:36: Name `SCREEN_WIDTH` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:325:54: Name `CURSOR_Y` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:330:16: Name `LegacyWindowsTerm` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:334:34: Name `WindowsCoordinates` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:334:57: Name `CURSOR_Y` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:341:16: Name `LegacyWindowsTerm` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:344:34: Name `WindowsCoordinates` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:344:53: Name `CURSOR_Y` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:351:16: Name `LegacyWindowsTerm` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:354:34: Name `WindowsCoordinates` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:354:57: Name `CURSOR_Y` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:354:71: Name `CURSOR_X` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:361:35: Name `StubScreenBufferInfo` used when possibly not defined
- error[lint:unknown-argument] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:362:13: Argument `dwCursorPosition` does not match any known parameter of bound method `__init__`
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:362:30: Name `COORD` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:362:39: Name `CURSOR_Y` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:367:16: Name `LegacyWindowsTerm` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:371:20: Name `WindowsCoordinates` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:371:43: Name `CURSOR_Y` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:371:61: Name `SCREEN_WIDTH` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:376:16: Name `LegacyWindowsTerm` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:385:48: Name `CURSOR_SIZE` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:389:16: Name `LegacyWindowsTerm` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:398:48: Name `CURSOR_SIZE` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:402:16: Name `LegacyWindowsTerm` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:409:16: Name `LegacyWindowsTerm` used when possibly not defined
- warning[lint:possibly-unbound-attribute] /tmp/mypy_primer/projects/rich/rich/_windows.py:20:32: Attribute `WinDLL` on type `<module 'ctypes'>` is possibly unbound
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/rich/_windows.py:46:18: Name `GetStdHandle` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/rich/_windows.py:48:28: Name `GetConsoleMode` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/rich/_windows.py:50:16: Name `LegacyWindowsError` used when possibly not defined
- warning[lint:possibly-unresolved-reference] /tmp/mypy_primer/projects/rich/rich/_windows.py:53:46: Name `ENABLE_VIRTUAL_TERMINAL_PROCESSING` used when possibly not defined
- warning[lint:possibly-unbound-attribute] /tmp/mypy_primer/projects/rich/rich/_windows.py:56:27: Attribute `getwindowsversion` on type `<module 'sys'>` is possibly unbound
- warning[lint:possibly-unbound-attribute] /tmp/mypy_primer/projects/rich/rich/ansi.py:229:5: Attribute `spawn` on type `<module 'pty'>` is possibly unbound
- warning[lint:possibly-unbound-attribute] /tmp/mypy_primer/projects/rich/rich/_win32_console.py:12:35: Attribute `WinDLL` on type `<module 'ctypes'>` is possibly unbound
+ error[lint:unresolved-attribute] /tmp/mypy_primer/projects/rich/rich/_windows.py:20:32: Type `<module 'ctypes'>` has no attribute `WinDLL`
+ error[lint:invalid-type-form] /tmp/mypy_primer/projects/rich/rich/_windows.py:40:43: Variable of type `Never` is not allowed in a type expression
+ error[lint:unresolved-attribute] /tmp/mypy_primer/projects/rich/rich/_windows.py:56:27: Type `<module 'sys'>` has no attribute `getwindowsversion`
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:31:17: Name `WindowsCoordinates` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:31:47: Name `WindowsCoordinates` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:38:32: Name `_win32_console` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:44:34: Name `CURSOR_SIZE` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:48:13: Name `_win32_console` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:50:26: Name `StubScreenBufferInfo` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:52:13: Name `_win32_console` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:60:16: Name `LegacyWindowsTerm` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:61:40: Name `WindowsCoordinates` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:61:63: Name `CURSOR_Y` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:61:77: Name `CURSOR_X` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:64:16: Name `LegacyWindowsTerm` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:65:36: Name `WindowsCoordinates` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:66:17: Name `SCREEN_HEIGHT` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:66:36: Name `SCREEN_WIDTH` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:71:16: Name `LegacyWindowsTerm` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:87:16: Name `LegacyWindowsTerm` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:103:47: Name `DEFAULT_STYLE_ATTRIBUTE` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:111:16: Name `LegacyWindowsTerm` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:128:16: Name `LegacyWindowsTerm` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:145:16: Name `LegacyWindowsTerm` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:162:16: Name `LegacyWindowsTerm` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:179:16: Name `LegacyWindowsTerm` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:200:16: Name `LegacyWindowsTerm` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:202:17: Name `WindowsCoordinates` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:202:40: Name `CURSOR_Y` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:204:39: Name `SCREEN_WIDTH` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:207:27: Name `DEFAULT_STYLE_ATTRIBUTE` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:207:59: Name `SCREEN_WIDTH` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:218:16: Name `LegacyWindowsTerm` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:222:39: Name `SCREEN_WIDTH` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:222:54: Name `CURSOR_X` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:222:70: Name `CURSOR_POSITION` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:226:13: Name `DEFAULT_STYLE_ATTRIBUTE` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:227:20: Name `SCREEN_WIDTH` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:227:35: Name `CURSOR_X` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:228:19: Name `CURSOR_POSITION` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:239:16: Name `LegacyWindowsTerm` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:242:17: Name `WindowsCoordinates` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:242:36: Name `CURSOR_Y` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:245:39: Name `CURSOR_X` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:248:27: Name `DEFAULT_STYLE_ATTRIBUTE` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:248:59: Name `CURSOR_X` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:255:18: Name `WindowsCoordinates` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:256:16: Name `LegacyWindowsTerm` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:266:18: Name `WindowsCoordinates` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:267:16: Name `LegacyWindowsTerm` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:277:18: Name `WindowsCoordinates` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:278:16: Name `LegacyWindowsTerm` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:288:16: Name `LegacyWindowsTerm` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:293:34: Name `WindowsCoordinates` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:293:57: Name `CURSOR_Y` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:293:75: Name `CURSOR_X` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:300:16: Name `LegacyWindowsTerm` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:305:34: Name `WindowsCoordinates` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:305:57: Name `CURSOR_Y` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:305:75: Name `CURSOR_X` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:312:16: Name `LegacyWindowsTerm` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:317:34: Name `WindowsCoordinates` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:317:57: Name `CURSOR_Y` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:317:71: Name `CURSOR_X` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:324:33: Name `StubScreenBufferInfo` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:325:30: Name `COORD` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:325:36: Name `SCREEN_WIDTH` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:325:54: Name `CURSOR_Y` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:330:16: Name `LegacyWindowsTerm` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:334:34: Name `WindowsCoordinates` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:334:57: Name `CURSOR_Y` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:341:16: Name `LegacyWindowsTerm` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:344:34: Name `WindowsCoordinates` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:344:53: Name `CURSOR_Y` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:351:16: Name `LegacyWindowsTerm` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:354:34: Name `WindowsCoordinates` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:354:57: Name `CURSOR_Y` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:354:71: Name `CURSOR_X` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:361:35: Name `StubScreenBufferInfo` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:362:30: Name `COORD` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:362:39: Name `CURSOR_Y` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:367:16: Name `LegacyWindowsTerm` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:371:20: Name `WindowsCoordinates` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:371:43: Name `CURSOR_Y` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:371:61: Name `SCREEN_WIDTH` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:376:16: Name `LegacyWindowsTerm` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:385:48: Name `CURSOR_SIZE` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:389:16: Name `LegacyWindowsTerm` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:398:48: Name `CURSOR_SIZE` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:402:16: Name `LegacyWindowsTerm` used when not defined
+ warning[lint:unresolved-reference] /tmp/mypy_primer/projects/rich/tests/test_win32_console.py:409:16: Name `LegacyWindowsTerm` used when not defined
+ error[lint:unresolved-attribute] /tmp/mypy_primer/projects/rich/rich/_win32_console.py:12:35: Type `<module 'ctypes'>` has no attribute `WinDLL`
+ error[lint:invalid-base] /tmp/mypy_primer/projects/rich/rich/_win32_console.py:33:26: Invalid class base with type `Never` (all bases must be a class, `Any`, `Unknown` or `Todo`)
+ error[lint:invalid-type-form] /tmp/mypy_primer/projects/rich/rich/_win32_console.py:44:57: Variable of type `Never` is not allowed in a type expression
+ error[lint:invalid-base] /tmp/mypy_primer/projects/rich/rich/_win32_console.py:57:34: Invalid class base with type `Never` (all bases must be a class, `Any`, `Unknown` or `Todo`)
+ error[lint:invalid-base] /tmp/mypy_primer/projects/rich/rich/_win32_console.py:67:27: Invalid class base with type `Never` (all bases must be a class, `Any`, `Unknown` or `Todo`)
+ error[lint:invalid-type-form] /tmp/mypy_primer/projects/rich/rich/_win32_console.py:78:43: Variable of type `Never` is not allowed in a type expression
+ error[lint:invalid-type-form] /tmp/mypy_primer/projects/rich/rich/_win32_console.py:95:32: Variable of type `Never` is not allowed in a type expression
+ error[lint:invalid-type-form] /tmp/mypy_primer/projects/rich/rich/_win32_console.py:129:17: Variable of type `Never` is not allowed in a type expression
+ error[lint:invalid-type-form] /tmp/mypy_primer/projects/rich/rich/_win32_console.py:132:12: Variable of type `Never` is not allowed in a type expression
+ error[lint:invalid-type-form] /tmp/mypy_primer/projects/rich/rich/_win32_console.py:170:17: Variable of type `Never` is not allowed in a type expression
+ error[lint:invalid-type-form] /tmp/mypy_primer/projects/rich/rich/_win32_console.py:173:12: Variable of type `Never` is not allowed in a type expression
+ error[lint:invalid-type-form] /tmp/mypy_primer/projects/rich/rich/_win32_console.py:205:17: Variable of type `Never` is not allowed in a type expression
+ error[lint:invalid-type-form] /tmp/mypy_primer/projects/rich/rich/_win32_console.py:205:46: Variable of type `Never` is not allowed in a type expression
+ error[lint:invalid-type-form] /tmp/mypy_primer/projects/rich/rich/_win32_console.py:229:17: Variable of type `Never` is not allowed in a type expression
+ error[lint:invalid-type-form] /tmp/mypy_primer/projects/rich/rich/_win32_console.py:230:6: Variable of type `Never` is not allowed in a type expression
+ error[lint:invalid-type-form] /tmp/mypy_primer/projects/rich/rich/_win32_console.py:253:17: Variable of type `Never` is not allowed in a type expression
+ error[lint:invalid-type-form] /tmp/mypy_primer/projects/rich/rich/_win32_console.py:253:42: Variable of type `Never` is not allowed in a type expression
+ error[lint:invalid-type-form] /tmp/mypy_primer/projects/rich/rich/_win32_console.py:276:17: Variable of type `Never` is not allowed in a type expression
+ error[lint:invalid-type-form] /tmp/mypy_primer/projects/rich/rich/_win32_console.py:276:47: Variable of type `Never` is not allowed in a type expression
+ error[lint:invalid-type-form] /tmp/mypy_primer/projects/rich/rich/_win32_console.py:300:17: Variable of type `Never` is not allowed in a type expression
+ error[lint:invalid-type-form] /tmp/mypy_primer/projects/rich/rich/_win32_console.py:300:47: Variable of type `Never` is not allowed in a type expression
+ error[lint:invalid-type-form] /tmp/mypy_primer/projects/rich/rich/_win32_console.py:377:34: Variable of type `Never` is not allowed in a type expression
+ error[lint:invalid-type-form] /tmp/mypy_primer/projects/rich/rich/_win32_console.py:387:30: Variable of type `Never` is not allowed in a type expression
+ error[lint:invalid-type-form] /tmp/mypy_primer/projects/rich/rich/_win32_console.py:405:46: Variable of type `Never` is not allowed in a type expression
+ error[lint:invalid-type-form] /tmp/mypy_primer/projects/rich/rich/_win32_console.py:444:44: Variable of type `Never` is not allowed in a type expression
- Found 868 diagnostics
+ Found 886 diagnostics

scrapy (https://github.com/scrapy/scrapy)
+ error[lint:unresolved-attribute] /tmp/mypy_primer/projects/scrapy/scrapy/utils/ossignal.py:38:23: Type `<module 'signal'>` has no attribute `SIGBREAK`
+ warning[lint:unused-ignore-comment] /tmp/mypy_primer/projects/scrapy/scrapy/extensions/debug.py:37:66: Unused blanket `type: ignore` directive
+ warning[lint:unused-ignore-comment] /tmp/mypy_primer/projects/scrapy/scrapy/extensions/debug.py:38:66: Unused blanket `type: ignore` directive
+ warning[lint:unused-ignore-comment] /tmp/mypy_primer/projects/scrapy/scrapy/extensions/debug.py:75:66: Unused blanket `type: ignore` directive
- warning[lint:possibly-unbound-attribute] /tmp/mypy_primer/projects/scrapy/tests/CrawlerProcess/asyncio_enabled_reactor_same_loop.py:8:35: Attribute `WindowsSelectorEventLoopPolicy` on type `<module 'asyncio'>` is possibly unbound
- error[lint:missing-argument] /tmp/mypy_primer/projects/scrapy/tests/CrawlerProcess/asyncio_enabled_reactor_same_loop.py:8:35: No arguments provided for required parameters `bases`, `namespace` of bound method `__new__`
- error[lint:invalid-argument-type] /tmp/mypy_primer/projects/scrapy/tests/CrawlerProcess/asyncio_enabled_reactor_same_loop.py:8:35: Object of type `Literal[WindowsSelectorEventLoopPolicy]` cannot be assigned to parameter 2 (`name`) of bound method `__new__`; expected type `str`
- warning[lint:possibly-unbound-attribute] /tmp/mypy_primer/projects/scrapy/tests/test_crawler.py:892:61: Attribute `SIGBREAK` on type `<module 'signal'>` is possibly unbound
- warning[lint:possibly-unbound-attribute] /tmp/mypy_primer/projects/scrapy/tests/test_crawler.py:906:61: Attribute `SIGBREAK` on type `<module 'signal'>` is possibly unbound
- warning[lint:possibly-unbound-attribute] /tmp/mypy_primer/projects/scrapy/scrapy/utils/ossignal.py:38:23: Attribute `SIGBREAK` on type `<module 'signal'>` is possibly unbound
+ error[lint:unresolved-attribute] /tmp/mypy_primer/projects/scrapy/scrapy/utils/reactor.py:84:17: Type `<module 'asyncio'>` has no attribute `WindowsSelectorEventLoopPolicy`
+ error[lint:unresolved-attribute] /tmp/mypy_primer/projects/scrapy/scrapy/utils/reactor.py:86:18: Type `<module 'asyncio'>` has no attribute `WindowsSelectorEventLoopPolicy`
- warning[lint:possibly-unbound-attribute] /tmp/mypy_primer/projects/scrapy/tests/CrawlerProcess/asyncio_enabled_reactor_different_loop.py:8:35: Attribute `WindowsSelectorEventLoopPolicy` on type `<module 'asyncio'>` is possibly unbound
- error[lint:missing-argument] /tmp/mypy_primer/projects/scrapy/tests/CrawlerProcess/asyncio_enabled_reactor_different_loop.py:8:35: No arguments provided for required parameters `bases`, `namespace` of bound method `__new__`
- error[lint:invalid-argument-type] /tmp/mypy_primer/projects/scrapy/tests/CrawlerProcess/asyncio_enabled_reactor_different_loop.py:8:35: Object of type `Literal[WindowsSelectorEventLoopPolicy]` cannot be assigned to parameter 2 (`name`) of bound method `__new__`; expected type `str`
- warning[lint:possibly-unbound-attribute] /tmp/mypy_primer/projects/scrapy/scrapy/utils/reactor.py:84:17: Attribute `WindowsSelectorEventLoopPolicy` on type `<module 'asyncio'>` is possibly unbound
- warning[lint:possibly-unbound-attribute] /tmp/mypy_primer/projects/scrapy/scrapy/utils/reactor.py:86:18: Attribute `WindowsSelectorEventLoopPolicy` on type `<module 'asyncio'>` is possibly unbound
- error[lint:missing-argument] /tmp/mypy_primer/projects/scrapy/scrapy/utils/reactor.py:86:18: No arguments provided for required parameters `bases`, `namespace` of bound method `__new__`
- error[lint:invalid-argument-type] /tmp/mypy_primer/projects/scrapy/scrapy/utils/reactor.py:86:18: Object of type `Literal[WindowsSelectorEventLoopPolicy]` cannot be assigned to parameter 2 (`name`) of bound method `__new__`; expected type `str`
+ error[lint:unresolved-attribute] /tmp/mypy_primer/projects/scrapy/tests/CrawlerProcess/asyncio_enabled_reactor_different_loop.py:8:35: Type `<module 'asyncio'>` has no attribute `WindowsSelectorEventLoopPolicy`
+ error[lint:unresolved-attribute] /tmp/mypy_primer/projects/scrapy/tests/CrawlerProcess/asyncio_enabled_reactor_same_loop.py:8:35: Type `<module 'asyncio'>` has no attribute `WindowsSelectorEventLoopPolicy`
+ error[lint:unresolved-attribute] /tmp/mypy_primer/projects/scrapy/tests/test_crawler.py:892:61: Type `<module 'signal'>` has no attribute `SIGBREAK`
+ error[lint:unresolved-attribute] /tmp/mypy_primer/projects/scrapy/tests/test_crawler.py:906:61: Type `<module 'signal'>` has no attribute `SIGBREAK`
+ warning[lint:unused-ignore-comment] /tmp/mypy_primer/projects/scrapy/scrapy/utils/console.py:85:50: Unused blanket `type: ignore` directive
- Found 1594 diagnostics
+ Found 1592 diagnostics

@MichaReiser MichaReiser force-pushed the micha/default-to-current-platform branch from eb8cf65 to bae0525 Compare April 3, 2025 19:42
@MichaReiser
Copy link
Member Author

MichaReiser commented Apr 3, 2025

Funny, this looks worse when just looking at mypy primer. Would @sharkdp's other unreachable work help to address some of those warnings?

@sharkdp
Copy link
Contributor

sharkdp commented Apr 3, 2025

Funny, this looks worse when just looking at mypy primer. Would @sharkdp's other unreachable work help to address some of those warnings?

Yes, it definitely will. You're mostly just turning "possibly unbound" diagnostics into "definitely unbound" diagnostics (which are now in unreachable sections of code, which is what we want from this change). Silencing these "definitely unbound" errors inside unreachable sections remains an open topic that I am still working on, even after that first batch of problems has been solved.

If we want to see the effect of this change in isolation, we should consider waiting with this PR until I have fixed that.

@sharkdp sharkdp force-pushed the micha/default-to-current-platform branch from bae0525 to 52f71fa Compare April 8, 2025 13:44
@sharkdp sharkdp force-pushed the micha/default-to-current-platform branch from 52f71fa to cc655ea Compare April 9, 2025 09:57
@sharkdp sharkdp marked this pull request as ready for review April 9, 2025 09:57
Copy link
Contributor

@sharkdp sharkdp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

I have analyzed all ecosystem diagnostic changes and added new test cases for those that we don't handle properly yet (#17306). Merging this will help me analyze the upcoming changes around unreachable-code diagnostics in a better way.

@sharkdp sharkdp merged commit 8249a72 into main Apr 9, 2025
23 checks passed
@sharkdp sharkdp deleted the micha/default-to-current-platform branch April 9, 2025 10:05
dcreager added a commit that referenced this pull request Apr 9, 2025
* origin/main:
  [red-knot] Default `python-platform` to current platform (#17183)
  [red-knot] Add new 'unreachable code' test case (#17306)
  [red-knot] mypy_primer: Run on `async-utils` (#17303)
  [red-knot] Add custom `__setattr__` support (#16748)
  [red-knot] Add `__init__` arguments check when doing `try_call` on a class literal (#16512)
  [`flake8-pie`] Avoid false positive for multiple assignment with `auto()` (`PIE796`) (#17274)
  [syntax-errors] Async comprehension in sync comprehension (#17177)
  [`airflow`] Expand module path check to individual symbols (`AIR302`) (#17278)
  [syntax-errors] Check annotations in annotated assignments (#17283)
  [syntax-errors] Extend annotation checks to `await` (#17282)
  [red-knot] Add support for `assert_never` (#17287)
  [`flake8-pytest-style`] Avoid false positive for legacy form of `pytest.raises` (`PT011`) (#17231)
  [red-knot] Do not show types for literal expressions on hover (#17290)
  [red-knot] Fix dead-code clippy warning (#17291)
  [red-knot] Reachability analysis (#17199)
  [red-knot] Don't use latency-sensitive for handlers (#17227)
dcreager added a commit that referenced this pull request Apr 9, 2025
* dcreager/special-class: (26 commits)
  lint
  Add TODO about property test data
  Better todos
  Narrow type(generic) better
  More Python-like displays for specializations
  Add xfail for generic method inside generic class
  Comment other non-specializations
  Explain self_instance not being specialized
  Generic aliases are literals in type display
  Better TODO fallback type
  [red-knot] Default `python-platform` to current platform (#17183)
  [red-knot] Add new 'unreachable code' test case (#17306)
  [red-knot] mypy_primer: Run on `async-utils` (#17303)
  [red-knot] Add custom `__setattr__` support (#16748)
  [red-knot] Add `__init__` arguments check when doing `try_call` on a class literal (#16512)
  [`flake8-pie`] Avoid false positive for multiple assignment with `auto()` (`PIE796`) (#17274)
  [syntax-errors] Async comprehension in sync comprehension (#17177)
  [`airflow`] Expand module path check to individual symbols (`AIR302`) (#17278)
  [syntax-errors] Check annotations in annotated assignments (#17283)
  [syntax-errors] Extend annotation checks to `await` (#17282)
  ...
Glyphack pushed a commit to Glyphack/ruff that referenced this pull request Apr 9, 2025
…7183)

## Summary

As discussed in https://github.com/astral-sh/ruff/issues/16983 and
"mitigate" said issue for the alpha.

This PR changes the default for `PythonPlatform` to be the current
platform rather than `all`.

I'm not sure if we should be as sophisticated as supporting `ios` and
`android` as defaults but it was easy...

## Test Plan

Updated Markdown tests.

---------

Co-authored-by: David Peter <mail@david-peter.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ty Multi-file analysis & type inference
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants