| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Source commit: python/typeshed@3402466
This is allegedly causing large performance problems, see 13821 typeshed/8231 had zero hits on mypy_primer, so it's not the worst thing to undo. Patching this in typeshed also feels weird, since there's a more general soundness issue. If a typevar has a bound or constraint, we might not want to solve it to a Literal. If we can confirm the performance regression or fix the unsoundness within mypy, I might pursue upstreaming this in typeshed. (Reminder: add this to the sync_typeshed script once merged)
The plugin provides superior type checking: python#13987 (comment) A manual cherry-pick of e437cdf.
Source commit: python/typeshed@6164242
This is allegedly causing large performance problems, see 13821 typeshed/8231 had zero hits on mypy_primer, so it's not the worst thing to undo. Patching this in typeshed also feels weird, since there's a more general soundness issue. If a typevar has a bound or constraint, we might not want to solve it to a Literal. If we can confirm the performance regression or fix the unsoundness within mypy, I might pursue upstreaming this in typeshed. (Reminder: add this to the sync_typeshed script once merged)
The plugin provides superior type checking: python#13987 (comment) A manual cherry-pick of e437cdf.
|
Diff from mypy_primer, showing the effect of this PR on open source code: spark (https://github.com/apache/spark)
+ python/pyspark/shuffle.py:556: error: Argument "key" to "merge" has incompatible type "Callable[[V], Any] | None"; expected "Callable[[V], SupportsDunderLT[Any] | SupportsDunderGT[Any]]" [arg-type]
+ python/pyspark/core/rdd.py:2575: error: Argument "key" to "nlargest" has incompatible type "Callable[[T], S] | None"; expected "Callable[[T], SupportsDunderLT[Any] | SupportsDunderGT[Any]]" [arg-type]
+ python/pyspark/core/rdd.py:2578: error: Argument "key" to "nlargest" has incompatible type "Callable[[T], S] | None"; expected "Callable[[T], SupportsDunderLT[Any] | SupportsDunderGT[Any]]" [arg-type]
+ python/pyspark/core/rdd.py:2635: error: Argument 3 to "nsmallest" has incompatible type "Callable[[T], S] | None"; expected "Callable[[T], SupportsDunderLT[Any] | SupportsDunderGT[Any]]" [arg-type]
+ python/pyspark/core/rdd.py:2637: error: Argument 3 to "nsmallest" has incompatible type "Callable[[T], S] | None"; expected "Callable[[T], SupportsDunderLT[Any] | SupportsDunderGT[Any]]" [arg-type]
+ python/pyspark/daemon.py:193: error: Value of type variable "_R" of "select" cannot be "object" [type-var]
psycopg (https://github.com/psycopg/psycopg)
+ psycopg/psycopg/_tstrings.py:43: error: Missing type arguments for generic type "Interpolation" [type-arg]
+ psycopg/psycopg/_tstrings.py:97: error: Missing type arguments for generic type "Interpolation" [type-arg]
+ psycopg/psycopg/_tstrings.py:110: error: Missing type arguments for generic type "Interpolation" [type-arg]
+ psycopg/psycopg/_tstrings.py:123: error: Missing type arguments for generic type "Interpolation" [type-arg]
prefect (https://github.com/PrefectHQ/prefect)
- src/prefect/cli/shell.py:76: note: def [AnyStr: (str, bytes)] Popen(args: str | bytes | PathLike[str] | PathLike[bytes] | Sequence[str | bytes | PathLike[str] | PathLike[bytes]], bufsize: int = ..., executable: str | bytes | PathLike[str] | PathLike[bytes] | None = ..., stdin: int | IO[Any] | None = ..., stdout: int | IO[Any] | None = ..., stderr: int | IO[Any] | None = ..., preexec_fn: Callable[[], object] | None = ..., close_fds: bool = ..., shell: bool = ..., cwd: str | bytes | PathLike[str] | PathLike[bytes] | None = ..., env: Mapping[bytes, str | bytes | PathLike[str] | PathLike[bytes]] | Mapping[str, str | bytes | PathLike[str] | PathLike[bytes]] | None = ..., universal_newlines: bool | None = ..., startupinfo: Any | None = ..., creationflags: int = ..., restore_signals: bool = ..., start_new_session: bool = ..., pass_fds: Collection[int] = ..., *, text: Literal[True], encoding: str | None = ..., errors: str | None = ..., user: str | int | None = ..., group: str | int | None = ..., extra_groups: Iterable[str | int] | None = ..., umask: int = ..., pipesize: int = ...) -> Popen[str]
+ src/prefect/cli/shell.py:76: note: def [AnyStr: (str, bytes)] Popen(args: str | bytes | PathLike[str] | PathLike[bytes] | Sequence[str | bytes | PathLike[str] | PathLike[bytes]], bufsize: int = ..., executable: str | bytes | PathLike[str] | PathLike[bytes] | None = ..., stdin: int | IO[Any] | None = ..., stdout: int | IO[Any] | None = ..., stderr: int | IO[Any] | None = ..., preexec_fn: Callable[[], object] | None = ..., close_fds: bool = ..., shell: bool = ..., cwd: str | bytes | PathLike[str] | PathLike[bytes] | None = ..., env: Mapping[bytes, str | bytes | PathLike[str] | PathLike[bytes]] | Mapping[str, str | bytes | PathLike[str] | PathLike[bytes]] | None = ..., universal_newlines: Literal[True] | None = ..., startupinfo: Any | None = ..., creationflags: int = ..., restore_signals: bool = ..., start_new_session: bool = ..., pass_fds: Collection[int] = ..., *, text: Literal[True], encoding: str | None = ..., errors: str | None = ..., user: str | int | None = ..., group: str | int | None = ..., extra_groups: Iterable[str | int] | None = ..., umask: int = ..., pipesize: int = ...) -> Popen[str]
zope.interface (https://github.com/zopefoundation/zope.interface)
- src/zope/interface/common/tests/test_io.py:36: error: Argument 1 to "BufferedWriter" has incompatible type "StringIO"; expected "RawIOBase" [arg-type]
+ src/zope/interface/common/tests/test_io.py:36: error: Value of type variable "_BufferedWriterStreamT" of "BufferedWriter" cannot be "StringIO" [type-var]
- src/zope/interface/common/tests/test_io.py:41: error: Argument 2 to "BufferedRWPair" has incompatible type "BytesIO"; expected "RawIOBase" [arg-type]
operator (https://github.com/canonical/operator)
+ ops/pebble.py:1904: error: Value of type variable "_R" of "select" cannot be "object" [type-var]
aiohttp (https://github.com/aio-libs/aiohttp)
+ aiohttp/resolver.py:67:39: error: Incompatible types in assignment (expression has type "int", variable has type "str") [assignment]
+ aiohttp/resolver.py:67:39: note: Error code "assignment" not covered by "type: ignore[misc]" comment
+ aiohttp/resolver.py:67:39: error: Incompatible types in assignment (expression has type "bytes", variable has type "int") [assignment]
urllib3 (https://github.com/urllib3/urllib3)
+ test/__init__.py:100: error: Argument 1 to "issubclass" has incompatible type "type[Warning] | tuple[type[Warning], ...]"; expected "type" [arg-type]
pylint (https://github.com/pycqa/pylint)
+ pylint/testutils/lint_module_test.py:319: error: Name "_csv._writer" is not defined [name-defined]
dulwich (https://github.com/dulwich/dulwich)
+ dulwich/filters.py:193: error: Returning Any from function declared to return "bytes" [no-any-return]
pyodide (https://github.com/pyodide/pyodide)
+ src/py/pyodide/webloop.py:1060: error: Unused "type: ignore" comment [unused-ignore]
pytest (https://github.com/pytest-dev/pytest)
+ testing/freeze/tox_run.py:16: error: function os.system is deprecated: Soft deprecated. Use the subprocess module instead. [deprecated]
schemathesis (https://github.com/schemathesis/schemathesis)
- src/schemathesis/specs/openapi/checks.py:1102: error: Argument 1 to "load" of "BaseCookie" has incompatible type "str | bytes"; expected "str | Mapping[str, str | Morsel[Any]]" [arg-type]
+ src/schemathesis/specs/openapi/checks.py:1102: error: Argument 1 to "load" of "BaseCookie" has incompatible type "str | bytes"; expected "str | SupportsItems[str, str | Morsel[Any]]" [arg-type]
mitmproxy (https://github.com/mitmproxy/mitmproxy)
+ mitmproxy/addons/dns_resolver.py:178: error: List comprehension has incompatible type List[str | int]; expected List[str] [misc]
dd-trace-py (https://github.com/DataDog/dd-trace-py)
+ ddtrace/llmobs/decorators.py:217: error: Argument 1 to "_get_span_inputs" has incompatible type "dict[str, Any]"; expected "OrderedDict[Any, Any]" [arg-type]
+ ddtrace/llmobs/decorators.py:233: error: Argument 1 to "_get_span_inputs" has incompatible type "dict[str, Any]"; expected "OrderedDict[Any, Any]" [arg-type]
+ ddtrace/llmobs/decorators.py:254: error: Argument 1 to "_get_span_inputs" has incompatible type "dict[str, Any]"; expected "OrderedDict[Any, Any]" [arg-type]
+ ddtrace/llmobs/decorators.py:279: error: Argument 1 to "_get_span_inputs" has incompatible type "dict[str, Any]"; expected "OrderedDict[Any, Any]" [arg-type]
ibis (https://github.com/ibis-project/ibis)
- ibis/expr/visualize.py:183: error: Incompatible types in assignment (expression has type "BufferedWriter", variable has type "_TemporaryFileWrapper[bytes]") [assignment]
+ ibis/expr/visualize.py:183: error: Incompatible types in assignment (expression has type "BufferedWriter[_BufferedWriterStream]", variable has type "_TemporaryFileWrapper[bytes]") [assignment]
|
Sorry, something went wrong.
Mypy primer hits
--
|
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Source commit:
python/typeshed@6164242