Use generator for `contextmanager` (Experiment)
Diff from mypy_primer, showing the effect of this PR on open source code:
beartype (https://github.com/beartype/beartype)
+ beartype/_util/error/utilerrwarn.py:40: error: Argument 1 to "contextmanager" has incompatible type "Callable[[], Iterator[None]]"; expected "Callable[[], Generator[Never, None, None]]" [arg-type]
+ beartype/_data/module/datamodcontextlib.py:19: error: Argument 1 to "contextmanager" has incompatible type "Callable[[], Iterator[None]]"; expected "Callable[[], Generator[Never, None, None]]" [arg-type]
+ beartype/claw/_pkg/clawpkgcontext.py:37: error: Argument 1 to "contextmanager" has incompatible type "Callable[[DefaultNamedArg(BeartypeConf, 'conf')], Iterator[None]]"; expected "Callable[[DefaultNamedArg(BeartypeConf, 'conf')], Generator[Never, None, None]]" [arg-type]
+ beartype/claw/_pkg/clawpkgcontext.py:134: error: Argument 1 to "contextmanager" has incompatible type "Callable[[], Iterator[None]]"; expected "Callable[[], Generator[Never, None, None]]" [arg-type]
anyio (https://github.com/agronholm/anyio)
+ src/anyio/pytest_plugin.py:29: error: Argument 1 to "contextmanager" has incompatible type "Callable[[str, dict[str, Any]], Iterator[TestRunner]]"; expected "Callable[[str, dict[str, Any]], Generator[Never, None, None]]" [arg-type]
+ src/anyio/pytest_plugin.py:73: error: Need type annotation for "runner" [var-annotated]
+ src/anyio/pytest_plugin.py:104: error: Need type annotation for "runner" [var-annotated]
+ src/anyio/pytest_plugin.py:123: error: Need type annotation for "runner" [var-annotated]
boostedblob (https://github.com/hauntsaninja/boostedblob)
+ boostedblob/globals.py:203: error: Argument 1 to "contextmanager" has incompatible type "Callable[[KwArg(Any)], Iterator[None]]"; expected "Callable[[KwArg(Any)], Generator[Never, None, None]]" [arg-type]
stone (https://github.com/dropbox/stone)
+ stone/backend.py:143: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Backend, str, str], Iterator[None]]"; expected "Callable[[Backend, str, str], Generator[Never, None, None]]" [arg-type]
+ stone/backend.py:184: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Backend, int | None], Iterator[None]]"; expected "Callable[[Backend, int | None], Generator[Never, None, None]]" [arg-type]
+ stone/backend.py:212: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Backend, StringIO], Iterator[None]]"; expected "Callable[[Backend, StringIO], Generator[Never, None, None]]" [arg-type]
+ stone/backend.py:442: error: Argument 1 to "contextmanager" has incompatible type "Callable[[CodeBackend, str, str, tuple[str, str], int | None, bool], Iterator[None]]"; expected "Callable[[CodeBackend, str, str, tuple[str, str], int | None, bool], Generator[Never, None, None]]" [arg-type]
+ stone/backends/python_helpers.py:55: error: Argument 1 to "contextmanager" has incompatible type "Callable[[CodeBackend], Iterator[None]]"; expected "Callable[[CodeBackend], Generator[Never, None, None]]" [arg-type]
sphinx (https://github.com/sphinx-doc/sphinx)
+ sphinx/util/osutil.py:164:2: error: Argument 1 to "contextmanager" has incompatible type "Callable[[str], Iterator[None]]"; expected "Callable[[str], Generator[Never, None, None]]" [arg-type]
+ sphinx/util/parsing.py:69:2: error: Argument 1 to "contextmanager" has incompatible type "Callable[[RSTState], Iterator[None]]"; expected "Callable[[RSTState], Generator[Never, None, None]]" [arg-type]
+ sphinx/util/logging.py:248:2: error: Argument 1 to "contextmanager" has incompatible type "Callable[[], Iterator[Handler]]"; expected "Callable[[], Generator[Never, None, None]]" [arg-type]
+ sphinx/util/logging.py:276:2: error: Argument 1 to "contextmanager" has incompatible type "Callable[[], Iterator[MemoryHandler]]"; expected "Callable[[], Generator[Never, None, None]]" [arg-type]
+ sphinx/util/logging.py:305:2: error: Argument 1 to "contextmanager" has incompatible type "Callable[[], Iterator[MemoryHandler]]"; expected "Callable[[], Generator[Never, None, None]]" [arg-type]
+ sphinx/util/logging.py: note: In function "pending_logging":
+ sphinx/util/logging.py:319:14: error: Need type annotation for "memhandler" [var-annotated]
+ sphinx/util/logging.py: note: At top level:
+ sphinx/util/logging.py:325:2: error: Argument 1 to "contextmanager" has incompatible type "Callable[[bool], Iterator[None]]"; expected "Callable[[bool], Generator[Never, None, None]]" [arg-type]
+ sphinx/util/logging.py:345:2: error: Argument 1 to "contextmanager" has incompatible type "Callable[[str], Iterator[None]]"; expected "Callable[[str], Generator[Never, None, None]]" [arg-type]
+ sphinx/util/logging.py: note: In class "LogCollector":
+ sphinx/util/logging.py:395:6: error: Argument 1 to "contextmanager" has incompatible type "Callable[[LogCollector], Iterator[None]]"; expected "Callable[[LogCollector], Generator[Never, None, None]]" [arg-type]
+ sphinx/util/logging.py: note: In member "collect" of class "LogCollector":
+ sphinx/util/logging.py:397:14: error: Need type annotation for "memhandler" [var-annotated]
+ sphinx/util/docutils.py:45:2: error: Argument 1 to "contextmanager" has incompatible type "Callable[[], Iterator[None]]"; expected "Callable[[], Generator[Never, None, None]]" [arg-type]
+ sphinx/util/docutils.py:123:2: error: Argument 1 to "contextmanager" has incompatible type "Callable[[], Iterator[None]]"; expected "Callable[[], Generator[Never, None, None]]" [arg-type]
+ sphinx/util/docutils.py:143:2: error: Argument 1 to "contextmanager" has incompatible type "Callable[[], Iterator[None]]"; expected "Callable[[], Generator[Never, None, None]]" [arg-type]
+ sphinx/util/docutils.py:167:2: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Optional[str]], Iterator[None]]"; expected "Callable[[Optional[str]], Generator[Never, None, None]]" [arg-type]
+ sphinx/util/docutils.py:183:2: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Optional[str]], Iterator[None]]"; expected "Callable[[Optional[str]], Generator[Never, None, None]]" [arg-type]
+ sphinx/util/docutils.py:327:2: error: Argument 1 to "contextmanager" has incompatible type "Callable[[State[Any], StringList], Iterator[None]]"; expected "Callable[[State[Any], StringList], Generator[Never, None, None]]" [arg-type]
+ sphinx/util/rst.py:63:2: error: Argument 1 to "contextmanager" has incompatible type "Callable[[str, str], Iterator[None]]"; expected "Callable[[str, str], Generator[Never, None, None]]" [arg-type]
+ sphinx/ext/autodoc/mock.py:142:2: error: Argument 1 to "contextmanager" has incompatible type "Callable[[list[str]], Iterator[None]]"; expected "Callable[[list[str]], Generator[Never, None, None]]" [arg-type]
kopf (https://github.com/nolar/kopf)
+ kopf/_core/actions/invocation.py:73: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Iterable[tuple[ContextVar[Any], Any]]], Iterator[None]]"; expected "Callable[[Iterable[tuple[ContextVar[Any], Any]]], Generator[Never, None, None]]" [arg-type]
xarray (https://github.com/pydata/xarray)
+ xarray/tests/test_backends.py: note: In member "test_dtype_coercion_error" of class "NetCDF3Only":
+ xarray/tests/test_backends.py:294: error: Need type annotation for "path" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "roundtrip" of class "DatasetIOBase":
+ xarray/tests/test_backends.py:314: error: Need type annotation for "path" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "roundtrip_append" of class "DatasetIOBase":
+ xarray/tests/test_backends.py:327: error: Need type annotation for "path" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_grid_mapping_and_bounds_are_not_coordinates_in_file" of class "CFEncodedBase":
+ xarray/tests/test_backends.py:1013: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_coordinates_encoding" of class "CFEncodedBase":
+ xarray/tests/test_backends.py:1081: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_append_overwrite_values" of class "CFEncodedBase":
+ xarray/tests/test_backends.py:1257: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_append_with_invalid_dim_raises" of class "CFEncodedBase":
+ xarray/tests/test_backends.py:1267: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_refresh_from_disk" of class "NetCDFBase":
+ xarray/tests/test_backends.py:1299: error: Need type annotation for "example_1_path" [var-annotated]
+ xarray/tests/test_backends.py:1300: error: Need type annotation for "example_1_modified_path" [var-annotated]
+ xarray/tests/test_backends.py: note: At top level:
+ xarray/tests/test_backends.py:1325: error: Argument 1 to "contextmanager" has incompatible type "Callable[[str, bool], Iterator[str]]"; expected "Callable[[str, bool], Generator[Never, None, None]]" [arg-type]
+ xarray/tests/test_backends.py:1341: error: Argument 1 to "contextmanager" has incompatible type "Callable[[int, str, bool], Iterator[list[str]]]"; expected "Callable[[int, str, bool], Generator[Never, None, None]]" [arg-type]
+ xarray/tests/test_backends.py: note: In function "create_tmp_files":
+ xarray/tests/test_backends.py:1346: error: Need type annotation for "files" (hint: "files: list[<type>] = ...") [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_open_group" of class "NetCDF4Base":
+ xarray/tests/test_backends.py:1360: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_open_subgroup" of class "NetCDF4Base":
+ xarray/tests/test_backends.py:1386: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_write_groups" of class "NetCDF4Base":
+ xarray/tests/test_backends.py:1408: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_roundtrip_character_array" of class "NetCDF4Base":
+ xarray/tests/test_backends.py:1451: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_open_encodings" of class "NetCDF4Base":
+ xarray/tests/test_backends.py:1478: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_dump_and_open_encodings" of class "NetCDF4Base":
+ xarray/tests/test_backends.py:1512: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py:1521: error: Need type annotation for "tmp_file2" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_mask_and_scale" of class "NetCDF4Base":
+ xarray/tests/test_backends.py:1674: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_0dimensional_variable" of class "NetCDF4Base":
+ xarray/tests/test_backends.py:1702: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_read_variable_len_strings" of class "NetCDF4Base":
+ xarray/tests/test_backends.py:1712: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_encoding_enum__no_fill_value" of class "NetCDF4Base":
+ xarray/tests/test_backends.py:1751: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_encoding_enum__multiple_variable_with_enum" of class "NetCDF4Base":
+ xarray/tests/test_backends.py:1782: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_encoding_enum__error_multiple_variable_with_changing_enum" of class "NetCDF4Base":
+ xarray/tests/test_backends.py:1829: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "create_store" of class "TestNetCDF4Data":
+ xarray/tests/test_backends.py:1874: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_base_case" of class "TestNetCDF4AlreadyOpen":
+ xarray/tests/test_backends.py:2005: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_group" of class "TestNetCDF4AlreadyOpen":
+ xarray/tests/test_backends.py:2017: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_deepcopy" of class "TestNetCDF4AlreadyOpen":
+ xarray/tests/test_backends.py:2041: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: At top level:
+ xarray/tests/test_backends.py: note: In member "create_zarr_target" of class "TestZarrDirectoryStore":
+ xarray/tests/test_backends.py:3201: error: Need type annotation for "tmp" [var-annotated]
+ xarray/tests/test_backends.py: note: In class "TestZarrWriteEmpty":
+ xarray/tests/test_backends.py:3217: error: Argument 1 to "contextmanager" has incompatible type "Callable[[TestZarrWriteEmpty], Iterator[tuple[str, str]]]"; expected "Callable[[TestZarrWriteEmpty], Generator[Never, None, None]]" [arg-type]
+ xarray/tests/test_backends.py:3223: error: Argument 1 to "contextmanager" has incompatible type "Callable[[TestZarrWriteEmpty, Any, Any, Any, Any, Any], Iterator[Dataset]]"; expected "Callable[[TestZarrWriteEmpty, Any, Any, Any, Any, Any], Generator[Never, None, None]]" [arg-type]
+ xarray/tests/test_backends.py: note: In member "test_write_empty" of class "TestZarrWriteEmpty":
+ xarray/tests/test_backends.py:3277: error: Never object is not iterable [misc]
+ xarray/tests/test_backends.py:3279: error: Cannot determine type of "store" [has-type]
+ xarray/tests/test_backends.py:3285: error: Need type annotation for "a_ds" [var-annotated]
+ xarray/tests/test_backends.py:3287: error: Cannot determine type of "store" [has-type]
+ xarray/tests/test_backends.py:3294: error: Cannot determine type of "store" [has-type]
+ xarray/tests/test_backends.py: note: In member "create_zarr_target" of class "TestZarrDirectoryStoreV3":
+ xarray/tests/test_backends.py:3358: error: Need type annotation for "tmp" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "create_zarr_target" of class "TestZarrDirectoryStoreV3FromPath":
+ xarray/tests/test_backends.py:3370: error: Need type annotation for "tmp" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "roundtrip" of class "TestScipyFileObject":
+ xarray/tests/test_backends.py:3423: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "create_store" of class "TestScipyFilePath":
+ xarray/tests/test_backends.py:3445: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_nc4_scipy" of class "TestScipyFilePath":
+ xarray/tests/test_backends.py:3468: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "create_store" of class "TestNetCDF3ViaNetCDF4Data":
+ xarray/tests/test_backends.py:3483: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "create_store" of class "TestNetCDF4ClassicViaNetCDF4Data":
+ xarray/tests/test_backends.py:3504: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_engine" of class "TestGenericNetCDFData":
+ xarray/tests/test_backends.py:3529: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_cross_engine_read_write_netcdf3" of class "TestGenericNetCDFData":
+ xarray/tests/test_backends.py:3548: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "create_store" of class "TestH5NetCDFData":
+ xarray/tests/test_backends.py:3592: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_cross_engine_read_write_netcdf4" of class "TestH5NetCDFData":
+ xarray/tests/test_backends.py:3631: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_read_byte_attrs_as_unicode" of class "TestH5NetCDFData":
+ xarray/tests/test_backends.py:3638: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_compression_check_encoding_h5py" of class "TestH5NetCDFData":
+ xarray/tests/test_backends.py:3704: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py:3722: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py:3732: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_decode_utf8_warning" of class "TestH5NetCDFData":
+ xarray/tests/test_backends.py:3765: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_open_dataset_group" of class "TestH5NetCDFAlreadyOpen":
+ xarray/tests/test_backends.py:3780: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_deepcopy" of class "TestH5NetCDFAlreadyOpen":
+ xarray/tests/test_backends.py:3803: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_open_twice" of class "TestH5NetCDFFileObject":
+ xarray/tests/test_backends.py:3844: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_open_fileobj" of class "TestH5NetCDFFileObject":
+ xarray/tests/test_backends.py:3856: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In function "test_open_mfdataset_manyfiles":
+ xarray/tests/test_backends.py:4021: error: Need type annotation for "tmpfiles" [var-annotated]
+ xarray/tests/test_backends.py: note: In function "test_open_mfdataset_list_attr":
+ xarray/tests/test_backends.py:4061: error: Need type annotation for "nfiles" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "setup_files_and_datasets" of class "TestOpenMFDatasetWithDataVarsAndCoordsKw":
+ xarray/tests/test_backends.py:4092: error: Need type annotation for "tmpfile1" [var-annotated]
+ xarray/tests/test_backends.py:4093: error: Need type annotation for "tmpfile2" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_open_mfdataset" of class "TestDask":
+ xarray/tests/test_backends.py:4354: error: Need type annotation for "tmp1" [var-annotated]
+ xarray/tests/test_backends.py:4355: error: Need type annotation for "tmp2" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_open_mfdataset_2d" of class "TestDask":
+ xarray/tests/test_backends.py:4384: error: Need type annotation for "tmp1" [var-annotated]
+ xarray/tests/test_backends.py:4385: error: Need type annotation for "tmp2" [var-annotated]
+ xarray/tests/test_backends.py:4386: error: Need type annotation for "tmp3" [var-annotated]
+ xarray/tests/test_backends.py:4387: error: Need type annotation for "tmp4" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_open_mfdataset_pathlib" of class "TestDask":
+ xarray/tests/test_backends.py:4413: error: Need type annotation for "tmps1" [var-annotated]
+ xarray/tests/test_backends.py:4414: error: Need type annotation for "tmps2" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_open_mfdataset_2d_pathlib" of class "TestDask":
+ xarray/tests/test_backends.py:4426: error: Need type annotation for "tmps1" [var-annotated]
+ xarray/tests/test_backends.py:4427: error: Need type annotation for "tmps2" [var-annotated]
+ xarray/tests/test_backends.py:4428: error: Need type annotation for "tmps3" [var-annotated]
+ xarray/tests/test_backends.py:4429: error: Need type annotation for "tmps4" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_open_mfdataset_2" of class "TestDask":
+ xarray/tests/test_backends.py:4447: error: Need type annotation for "tmp1" [var-annotated]
+ xarray/tests/test_backends.py:4448: error: Need type annotation for "tmp2" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_attrs_mfdataset" of class "TestDask":
+ xarray/tests/test_backends.py:4459: error: Need type annotation for "tmp1" [var-annotated]
+ xarray/tests/test_backends.py:4460: error: Need type annotation for "tmp2" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_open_mfdataset_attrs_file" of class "TestDask":
+ xarray/tests/test_backends.py:4479: error: Never object is not iterable [misc]
+ xarray/tests/test_backends.py:4484: error: Cannot determine type of "tmp1" [has-type]
+ xarray/tests/test_backends.py:4485: error: Cannot determine type of "tmp2" [has-type]
+ xarray/tests/test_backends.py:4487: error: Cannot determine type of "tmp1" [has-type]
+ xarray/tests/test_backends.py:4487: error: Cannot determine type of "tmp2" [has-type]
+ xarray/tests/test_backends.py: note: In member "test_open_mfdataset_attrs_file_path" of class "TestDask":
+ xarray/tests/test_backends.py:4496: error: Never object is not iterable [misc]
+ xarray/tests/test_backends.py:4497: error: Cannot determine type of "tmps1" [has-type]
+ xarray/tests/test_backends.py:4498: error: Cannot determine type of "tmps2" [has-type]
+ xarray/tests/test_backends.py: note: In member "test_open_mfdataset_auto_combine" of class "TestDask":
+ xarray/tests/test_backends.py:4515: error: Need type annotation for "tmp1" [var-annotated]
+ xarray/tests/test_backends.py:4516: error: Need type annotation for "tmp2" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_open_mfdataset_raise_on_bad_combine_args" of class "TestDask":
+ xarray/tests/test_backends.py:4526: error: Need type annotation for "tmp1" [var-annotated]
+ xarray/tests/test_backends.py:4527: error: Need type annotation for "tmp2" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_encoding_mfdataset" of class "TestDask":
+ xarray/tests/test_backends.py:4542: error: Need type annotation for "tmp1" [var-annotated]
+ xarray/tests/test_backends.py:4543: error: Need type annotation for "tmp2" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_preprocess_mfdataset" of class "TestDask":
+ xarray/tests/test_backends.py:4557: error: Need type annotation for "tmp" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_save_mfdataset_roundtrip" of class "TestDask":
+ xarray/tests/test_backends.py:4572: error: Need type annotation for "tmp1" [var-annotated]
+ xarray/tests/test_backends.py:4573: error: Need type annotation for "tmp2" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_save_mfdataset_pathlib_roundtrip" of class "TestDask":
+ xarray/tests/test_backends.py:4596: error: Need type annotation for "tmps1" [var-annotated]
+ xarray/tests/test_backends.py:4597: error: Need type annotation for "tmps2" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_open_and_do_math" of class "TestDask":
+ xarray/tests/test_backends.py:4631: error: Need type annotation for "tmp" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_open_mfdataset_concat_dim_none" of class "TestDask":
+ xarray/tests/test_backends.py:4638: error: Need type annotation for "tmp1" [var-annotated]
+ xarray/tests/test_backends.py:4639: error: Need type annotation for "tmp2" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_open_mfdataset_concat_dim_default_none" of class "TestDask":
+ xarray/tests/test_backends.py:4649: error: Need type annotation for "tmp1" [var-annotated]
+ xarray/tests/test_backends.py:4650: error: Need type annotation for "tmp2" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_open_dataset" of class "TestDask":
+ xarray/tests/test_backends.py:4659: error: Need type annotation for "tmp" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_open_single_dataset" of class "TestDask":
+ xarray/tests/test_backends.py:4680: error: Need type annotation for "tmp" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_open_multi_dataset" of class "TestDask":
+ xarray/tests/test_backends.py:4702: error: Need type annotation for "tmp1" [var-annotated]
+ xarray/tests/test_backends.py:4702: error: Need type annotation for "tmp2" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_dask_roundtrip" of class "TestDask":
+ xarray/tests/test_backends.py:4713: error: Need type annotation for "tmp" [var-annotated]
+ xarray/tests/test_backends.py:4719: error: Need type annotation for "tmp2" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_deterministic_names" of class "TestDask":
+ xarray/tests/test_backends.py:4725: error: Need type annotation for "tmp" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_save_mfdataset_compute_false_roundtrip" of class "TestDask":
+ xarray/tests/test_backends.py:4752: error: Need type annotation for "tmp1" [var-annotated]
+ xarray/tests/test_backends.py:4753: error: Need type annotation for "tmp2" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_load_dataset" of class "TestDask":
+ xarray/tests/test_backends.py:4765: error: Need type annotation for "tmp" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_load_dataarray" of class "TestDask":
+ xarray/tests/test_backends.py:4773: error: Need type annotation for "tmp" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_inline_array" of class "TestDask":
+ xarray/tests/test_backends.py:4786: error: Need type annotation for "tmp" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_compatible_to_netcdf" of class "TestPydap":
+ xarray/tests/test_backends.py:4876: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_validating_attrs" of class "TestValidateAttrs":
+ xarray/tests/test_backends.py:4995: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_dataarray_to_netcdf_no_name" of class "TestDataArrayToNetCDF":
+ xarray/tests/test_backends.py:5049: error: Need type annotation for "tmp" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_dataarray_to_netcdf_with_name" of class "TestDataArrayToNetCDF":
+ xarray/tests/test_backends.py:5058: error: Need type annotation for "tmp" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_dataarray_to_netcdf_coord_name_clash" of class "TestDataArrayToNetCDF":
+ xarray/tests/test_backends.py:5069: error: Need type annotation for "tmp" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_open_dataarray_options" of class "TestDataArrayToNetCDF":
+ xarray/tests/test_backends.py:5078: error: Need type annotation for "tmp" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_dataarray_to_netcdf_no_name_pathlib" of class "TestDataArrayToNetCDF":
+ xarray/tests/test_backends.py:5095: error: Need type annotation for "tmps" [var-annotated]
+ xarray/tests/test_backends.py: note: In function "test_no_warning_from_dask_effective_get":
+ xarray/tests/test_backends.py:5155: error: Need type annotation for "tmpfile" [var-annotated]
+ xarray/tests/test_backends.py: note: In function "test_source_encoding_always_present":
+ xarray/tests/test_backends.py:5166: error: Need type annotation for "tmp" [var-annotated]
+ xarray/tests/test_backends.py: note: In function "test_source_encoding_always_present_with_pathlib":
+ xarray/tests/test_backends.py:5177: error: Need type annotation for "tmp" [var-annotated]
+ xarray/tests/test_backends.py: note: In function "test_source_encoding_always_present_with_fsspec":
+ xarray/tests/test_backends.py:5190: error: Need type annotation for "tmp" [var-annotated]
+ xarray/tests/test_backends.py: note: In function "test_use_cftime_standard_calendar_default_in_range":
+ xarray/tests/test_backends.py:5223: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In function "test_use_cftime_standard_calendar_default_out_of_range":
+ xarray/tests/test_backends.py:5256: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In function "test_use_cftime_true":
+ xarray/tests/test_backends.py:5286: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In function "test_use_cftime_false_standard_calendar_in_range":
+ xarray/tests/test_backends.py:5317: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In function "test_use_cftime_false_standard_calendar_out_of_range":
+ xarray/tests/test_backends.py:5338: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In function "test_use_cftime_false_nonstandard_calendar":
+ xarray/tests/test_backends.py:5356: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_open_nczarr" of class "TestNCZarr":
+ xarray/tests/test_backends.py:5673: error: Need type annotation for "tmp" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_overwriting_nczarr" of class "TestNCZarr":
+ xarray/tests/test_backends.py:5679: error: Need type annotation for "tmp" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_raise_writing_to_nczarr" of class "TestNCZarr":
+ xarray/tests/test_backends.py:5692: error: Need type annotation for "tmp" [var-annotated]
+ xarray/tests/test_distributed.py: note: In function "test_dask_distributed_zarr_integration_test":
+ xarray/tests/test_distributed.py:232: error: Need type annotation for "filename" [var-annotated]
trio (https://github.com/python-trio/trio)
+ src/trio/_core/_run.py:687: error: Argument 1 to "contextmanager" has incompatible type "Callable[[CancelScope], Iterator[None]]"; expected "Callable[[CancelScope], Generator[Never, None, None]]" [arg-type]
+ src/trio/_core/_tests/test_ki.py:132: error: Argument 1 to "contextmanager" has incompatible type "Callable[[], Iterator[None]]"; expected "Callable[[], Generator[Never, None, None]]" [arg-type]
+ src/trio/_tests/test_ssl.py:377: error: Argument 1 to "contextmanager" has incompatible type "Callable[[SSLContext, KwArg(Any)], Iterator[SSLStream[PyOpenSSLEchoStream]]]"; expected "Callable[[SSLContext, KwArg(Any)], Generator[Never, None, None]]" [arg-type]
+ src/trio/_tests/test_ssl.py:377: note: Error code "arg-type" not covered by "type: ignore" comment
+ src/trio/_tests/test_ssl.py:597: error: Need type annotation for "s" [var-annotated]
+ src/trio/_tests/test_ssl.py:649: error: Need type annotation for "s" [var-annotated]
+ src/trio/_core/_tests/test_thread_cache.py:109: error: Argument 1 to "contextmanager" has incompatible type "Callable[[], Iterator[None]]"; expected "Callable[[], Generator[Never, None, None]]" [arg-type]
cloud-init (https://github.com/canonical/cloud-init)
+ tests/integration_tests/conftest.py:269: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Any, Any, IntegrationCloud], Iterator[IntegrationInstance]]"; expected "Callable[[Any, Any, IntegrationCloud], Generator[Never, None, None]]" [arg-type]
+ tests/integration_tests/conftest.py:325: error: Need type annotation for "client" [var-annotated]
+ tests/integration_tests/conftest.py:334: error: Need type annotation for "client" [var-annotated]
+ tests/integration_tests/conftest.py:343: error: Need type annotation for "client" [var-annotated]
dd-trace-py (https://github.com/DataDog/dd-trace-py)
+ ddtrace/opentelemetry/_trace.py:121: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Tracer, str, Any | None, Any, Mapping[str, Any] | None, Sequence[Any] | None, int | None, bool, bool, bool], Iterator[Any]]"; expected "Callable[[Tracer, str, Any | None, Any, Mapping[str, Any] | None, Sequence[Any] | None, int | None, bool, bool, bool], Generator[Never, None, None]]" [arg-type]
artigraph (https://github.com/artigraph/artigraph)
+ src/arti/internal/__init__.py:7: error: Argument 1 to "contextmanager" has incompatible type "Callable[[type[Exception], NamedArg(str, 'prefix')], Iterator[None]]"; expected "Callable[[type[Exception], NamedArg(str, 'prefix')], Generator[Never, None, None]]" [arg-type]
+ src/arti/backends/__init__.py:122: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Self], Iterator[Self]]"; expected "Callable[[Never], Generator[Never, None, None]]" [arg-type]
+ src/arti/backends/__init__.py:144: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Backend], Iterator[Any]]"; expected "Callable[[Backend], Generator[Never, None, None]]" [arg-type]
+ src/arti/graphs/__init__.py:238: error: Invalid self argument "BackendConnection" to attribute function "connect" with type "Callable[[Never], _GeneratorContextManager[Never]]" [misc]
+ src/arti/graphs/__init__.py:238: error: Need type annotation for "conn" [var-annotated]
+ src/arti/graphs/__init__.py:283: error: Invalid self argument "BackendConnection" to attribute function "connect" with type "Callable[[Never], _GeneratorContextManager[Never]]" [misc]
+ src/arti/graphs/__init__.py:283: error: Need type annotation for "conn" [var-annotated]
+ src/arti/graphs/__init__.py:353: error: Invalid self argument "BackendConnection" to attribute function "connect" with type "Callable[[Never], _GeneratorContextManager[Never]]" [misc]
+ src/arti/graphs/__init__.py:353: error: Need type annotation for "conn" [var-annotated]
+ src/arti/graphs/__init__.py:373: error: Invalid self argument "BackendConnection" to attribute function "connect" with type "Callable[[Never], _GeneratorContextManager[Never]]" [misc]
+ src/arti/graphs/__init__.py:373: error: Need type annotation for "conn" [var-annotated]
+ src/arti/graphs/__init__.py:384: error: Invalid self argument "BackendConnection" to attribute function "connect" with type "Callable[[Never], _GeneratorContextManager[Never]]" [misc]
+ src/arti/graphs/__init__.py:384: error: Need type annotation for "conn" [var-annotated]
+ src/arti/graphs/__init__.py:385: error: Returning Any from function declared to return "GraphSnapshot" [no-any-return]
+ src/arti/executors/local.py:24: error: Need type annotation for "backend" [var-annotated]
+ src/arti/backends/memory.py:136: error: Argument 1 to "contextmanager" has incompatible type "Callable[[MemoryBackend], Iterator[MemoryConnection]]"; expected "Callable[[MemoryBackend], Generator[Never, None, None]]" [arg-type]
+ tests/arti/graphs/test_graph.py:141: error: Need type annotation for "conn" [var-annotated]
+ tests/arti/graphs/test_graph.py:198: error: Need type annotation for "conn" [var-annotated]
+ tests/arti/graphs/test_graph.py:252: error: Need type annotation for "conn" [var-annotated]
+ tests/arti/graphs/test_graph.py:440: error: Need type annotation for "conn" [var-annotated]
mypy (https://github.com/python/mypy)
+ mypyc/crash.py:9: error: Argument 1 to "contextmanager" has incompatible type "Callable[[str, int], Iterator[None]]"; expected "Callable[[str, int], Generator[Never, None, None]]" [arg-type]
+ mypy/state.py:17: error: Argument 1 to "contextmanager" has incompatible type "Callable[[StrictOptionalState, bool], Iterator[None]]"; expected "Callable[[StrictOptionalState, bool], Generator[Never, None, None]]" [arg-type]
+ mypy/scope.py:57: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Scope, str], Iterator[None]]"; expected "Callable[[Scope, str], Generator[Never, None, None]]" [arg-type]
+ mypy/scope.py:67: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Scope, FuncBase], Iterator[None]]"; expected "Callable[[Scope, FuncBase], Generator[Never, None, None]]" [arg-type]
+ mypy/scope.py:105: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Scope, TypeInfo], Iterator[None]]"; expected "Callable[[Scope, TypeInfo], Generator[Never, None, None]]" [arg-type]
+ mypy/scope.py:119: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Scope, Tuple[str, Optional[TypeInfo], Optional[FuncBase]]], Iterator[None]]"; expected "Callable[[Scope, Tuple[str, Optional[TypeInfo], Optional[FuncBase]]], Generator[Never, None, None]]" [arg-type]
+ mypy/server/aststrip.py:263: error: Argument 1 to "contextmanager" has incompatible type "Callable[[NodeStripVisitor, TypeInfo], Iterator[None]]"; expected "Callable[[NodeStripVisitor, TypeInfo], Generator[Never, None, None]]" [arg-type]
+ mypy/server/aststrip.py:273: error: Argument 1 to "contextmanager" has incompatible type "Callable[[NodeStripVisitor, TypeInfo], Iterator[None]]"; expected "Callable[[NodeStripVisitor, TypeInfo], Generator[Never, None, None]]" [arg-type]
+ mypy/renaming.py:295: error: Argument 1 to "contextmanager" has incompatible type "Callable[[VariableRenameVisitor], Iterator[None]]"; expected "Callable[[VariableRenameVisitor], Generator[Never, None, None]]" [arg-type]
+ mypy/renaming.py:305: error: Argument 1 to "contextmanager" has incompatible type "Callable[[VariableRenameVisitor], Iterator[None]]"; expected "Callable[[VariableRenameVisitor], Generator[Never, None, None]]" [arg-type]
+ mypy/renaming.py:313: error: Argument 1 to "contextmanager" has incompatible type "Callable[[VariableRenameVisitor], Iterator[None]]"; expected "Callable[[VariableRenameVisitor], Generator[Never, None, None]]" [arg-type]
+ mypy/renaming.py:324: error: Argument 1 to "contextmanager" has incompatible type "Callable[[VariableRenameVisitor, int], Iterator[None]]"; expected "Callable[[VariableRenameVisitor, int], Generator[Never, None, None]]" [arg-type]
+ mypy/renaming.py:537: error: Argument 1 to "contextmanager" has incompatible type "Callable[[LimitedVariableRenameVisitor], Iterator[None]]"; expected "Callable[[LimitedVariableRenameVisitor], Generator[Never, None, None]]" [arg-type]
+ mypy/stubutil.py:132: error: Argument 1 to "contextmanager" has incompatible type "Callable[[str, str, bool, bool], Iterator[None]]"; expected "Callable[[str, str, bool, bool], Generator[Never, None, None]]" [arg-type]
+ mypy/subtypes.py:183: error: Argument 1 to "pop_on_exit" has incompatible type "List[Tuple[Type, Type]]"; expected "List[Tuple[Never, Never]]" [arg-type]
+ mypy/subtypes.py:183: error: Argument 2 to "pop_on_exit" has incompatible type "Type"; expected Never [arg-type]
+ mypy/subtypes.py:183: error: Argument 3 to "pop_on_exit" has incompatible type "Type"; expected Never [arg-type]
+ mypy/subtypes.py:220: error: Argument 1 to "pop_on_exit" has incompatible type "List[Tuple[Type, Type]]"; expected "List[Tuple[Never, Never]]" [arg-type]
+ mypy/subtypes.py:220: error: Argument 2 to "pop_on_exit" has incompatible type "Type"; expected Never [arg-type]
+ mypy/subtypes.py:220: error: Argument 3 to "pop_on_exit" has incompatible type "Type"; expected Never [arg-type]
+ mypy/subtypes.py:1101: error: Argument 1 to "contextmanager" has incompatible type "Callable[[List[Tuple[T, T]], T, T], Iterator[None]]"; expected "Callable[[List[Tuple[Never, Never]], Never, Never], Generator[Never, None, None]]" [arg-type]
+ mypy/subtypes.py:1151: error: Argument 1 to "pop_on_exit" has incompatible type "List[Tuple[Instance, Instance]]"; expected "List[Tuple[Never, Never]]" [arg-type]
+ mypy/subtypes.py:1151: error: Argument 2 to "pop_on_exit" has incompatible type "Instance"; expected Never [arg-type]
+ mypy/subtypes.py:1151: error: Argument 3 to "pop_on_exit" has incompatible type "Instance"; expected Never [arg-type]
+ mypy/messages.py:198: error: Argument 1 to "contextmanager" has incompatible type "Callable[[MessageBuilder], Iterator[None]]"; expected "Callable[[MessageBuilder], Generator[Never, None, None]]" [arg-type]
+ mypy/binder.py:266: error: Argument 1 to "contextmanager" has incompatible type "Callable[[ConditionalTypeBinder], Iterator[defaultdict[Expression, List[Tuple[Type, Optional[Type]]]]]]"; expected "Callable[[ConditionalTypeBinder], Generator[Never, None, None]]" [arg-type]
+ mypy/binder.py:401: error: Argument 1 to "contextmanager" has incompatible type "Callable[[ConditionalTypeBinder, NamedArg(bool, 'can_skip'), DefaultNamedArg(int, 'fall_through'), DefaultNamedArg(int, 'break_frame'), DefaultNamedArg(int, 'continue_frame'), DefaultNamedArg(bool, 'conditional_frame'), DefaultNamedArg(bool, 'try_frame')], Iterator[Frame]]"; expected "Callable[[ConditionalTypeBinder, NamedArg(bool, 'can_skip'), DefaultNamedArg(int, 'fall_through'), DefaultNamedArg(int, 'break_frame'), DefaultNamedArg(int, 'continue_frame'), DefaultNamedArg(bool, 'conditional_frame'), DefaultNamedArg(bool, 'try_frame')], Generator[Never, None, None]]" [arg-type]
+ mypy/binder.py:459: error: Argument 1 to "contextmanager" has incompatible type "Callable[[ConditionalTypeBinder], Iterator[Frame]]"; expected "Callable[[ConditionalTypeBinder], Generator[Never, None, None]]" [arg-type]
+ mypy/typeanal.py:1699: error: Argument 1 to "contextmanager" has incompatible type "Callable[[TypeAnalyser, str], Iterator[None]]"; expected "Callable[[TypeAnalyser, str], Generator[Never, None, None]]" [arg-type]
+ mypy/semanal_namedtuple.py:664: error: Argument 1 to "contextmanager" has incompatible type "Callable[[NamedTupleAnalyzer, TypeInfo], Iterator[None]]"; expected "Callable[[NamedTupleAnalyzer, TypeInfo], Generator[Never, None, None]]" [arg-type]
+ mypy/semanal.py:504: error: Argument 1 to "contextmanager" has incompatible type "Callable[[SemanticAnalyzer], Iterator[None]]"; expected "Callable[[SemanticAnalyzer], Generator[Never, None, None]]" [arg-type]
+ mypy/semanal.py:795: error: Argument 1 to "contextmanager" has incompatible type "Callable[[SemanticAnalyzer, MypyFile, Options, Optional[TypeInfo]], Iterator[None]]"; expected "Callable[[SemanticAnalyzer, MypyFile, Options, Optional[TypeInfo]], Generator[Never, None, None]]" [arg-type]
+ mypy/semanal.py:1187: error: Argument 1 to "contextmanager" has incompatible type "Callable[[SemanticAnalyzer, Optional[int]], Iterator[None]]"; expected "Callable[[SemanticAnalyzer, Optional[int]], Generator[Never, None, None]]" [arg-type]
+ mypy/semanal.py:6727: error: Argument 1 to "contextmanager" has incompatible type "Callable[[SemanticAnalyzer, TypeVarLikeScope], Iterator[None]]"; expected "Callable[[SemanticAnalyzer, TypeVarLikeScope], Generator[Never, None, None]]" [arg-type]
+ mypy/semanal.py:6849: error: Argument 1 to "contextmanager" has incompatible type "Callable[[SemanticAnalyzer, Union[FuncItem, GeneratorExpr, DictionaryComprehension]], Iterator[None]]"; expected "Callable[[SemanticAnalyzer, Union[FuncItem, GeneratorExpr, DictionaryComprehension]], Generator[Never, None, None]]" [arg-type]
+ mypy/checkexpr.py:2840: error: Need type annotation for "m" [var-annotated]
+ mypy/checkexpr.py:3059: error: Argument 1 to "contextmanager" has incompatible type "Callable[[ExpressionChecker, Sequence[Expression], Sequence[Type]], Iterator[None]]"; expected "Callable[[ExpressionChecker, Sequence[Expression], Sequence[Type]], Generator[Never, None, None]]" [arg-type]
+ mypy/checkexpr.py:5200: error: Need type annotation for "tmap" [var-annotated]
+ mypy/checker.py:1135: error: Argument 1 to "contextmanager" has incompatible type "Callable[[TypeChecker], Iterator[None]]"; expected "Callable[[TypeChecker], Generator[Never, None, None]]" [arg-type]
+ mypy/checker.py:3465: error: Argument 1 to "contextmanager" has incompatible type "Callable[[TypeChecker, bool], Iterator[None]]"; expected "Callable[[TypeChecker, bool], Generator[Never, None, None]]" [arg-type]
+ mypy/checker.py:3804: error: Need type annotation for "assignments" [var-annotated]
+ mypy/checker.py:3804: note: See https://mypy.rtfd.io/en/stable/_refs.html#code-var-annotated for more info
+ mypy/checker.py:4282: error: Need type annotation for "type_map" [var-annotated]
+ mypy/checker.py:6895: error: Argument 1 to "contextmanager" has incompatible type "Callable[[TypeChecker], Iterator[None]]"; expected "Callable[[TypeChecker], Generator[Never, None, None]]" [arg-type]
+ mypy/checker.py:6984: error: Argument 1 to "contextmanager" has incompatible type "Callable[[TypeChecker], Iterator[Dict[Expression, Type]]]"; expected "Callable[[TypeChecker], Generator[Never, None, None]]" [arg-type]
+ mypy/checker.py:7052: error: Argument 1 to "contextmanager" has incompatible type "Callable[[TypeChecker, DefaultNamedArg(bool, 'is_function'), DefaultNamedArg(bool, 'is_class')], Iterator[None]]"; expected "Callable[[TypeChecker, DefaultNamedArg(bool, 'is_function'), DefaultNamedArg(bool, 'is_class')], Generator[Never, None, None]]" [arg-type]
+ mypy/checker.py:8197: error: Argument 1 to "contextmanager" has incompatible type "Callable[[CheckerScope, FuncItem], Iterator[None]]"; expected "Callable[[CheckerScope, FuncItem], Generator[Never, None, None]]" [arg-type]
+ mypy/checker.py:8203: error: Argument 1 to "contextmanager" has incompatible type "Callable[[CheckerScope, TypeInfo], Iterator[None]]"; expected "Callable[[CheckerScope, TypeInfo], Generator[Never, None, None]]" [arg-type]
+ mypy/stats.py:173: error: Argument 1 to "contextmanager" has incompatible type "Callable[[StatisticsVisitor, FuncDef], Iterator[None]]"; expected "Callable[[StatisticsVisitor, FuncDef], Generator[Never, None, None]]" [arg-type]
+ mypy/build.py:2055: error: Argument 1 to "contextmanager" has incompatible type "Callable[[State, bool], Iterator[None]]"; expected "Callable[[State, bool], Generator[Never, None, None]]" [arg-type]
+ mypyc/irbuild/builder.py:1157: error: Argument 1 to "contextmanager" has incompatible type "Callable[[IRBuilder, ClassIR, str, RType, Union[FuncInfo, str], Optional[RType]], Iterator[None]]"; expected "Callable[[IRBuilder, ClassIR, str, RType, Union[FuncInfo, str], Optional[RType]], Generator[Never, None, None]]" [arg-type]
+ mypy/test/teststubtest.py:19: error: Argument 1 to "contextmanager" has incompatible type "Callable[[str], Iterator[str]]"; expected "Callable[[str], Generator[Never, None, None]]" [arg-type]
+ mypy/test/teststubtest.py:150: error: Need type annotation for "tmp_dir" [var-annotated]
+ mypy/suggestions.py:289: error: Argument 1 to "contextmanager" has incompatible type "Callable[[SuggestionEngine, str], Iterator[None]]"; expected "Callable[[SuggestionEngine, str], Generator[Never, None, None]]" [arg-type]
+ mypy/suggestions.py:300: error: Argument 1 to "contextmanager" has incompatible type "Callable[[SuggestionEngine], Iterator[None]]"; expected "Callable[[SuggestionEngine], Generator[Never, None, None]]" [arg-type]
+ mypy/test/helpers.py:242: error: Argument 1 to "contextmanager" has incompatible type "Callable[[], Iterator[None]]"; expected "Callable[[], Generator[Never, None, None]]" [arg-type]
+ mypy/test/testpep561.py:30: error: Argument 1 to "contextmanager" has incompatible type "Callable[[str], Iterator[Tuple[str, str]]]"; expected "Callable[[str], Generator[Never, None, None]]" [arg-type]
+ mypy/test/testpep561.py:111: error: Need type annotation for "venv" [var-annotated]
+ mypyc/test/testutil.py:50: error: Argument 1 to "contextmanager" has incompatible type "Callable[[str, DataDrivenTestCase], Iterator[None]]"; expected "Callable[[str, DataDrivenTestCase], Generator[Never, None, None]]" [arg-type]
+ mypyc/test/test_run.py:125: error: Argument 1 to "contextmanager" has incompatible type "Callable[[str], Iterator[None]]"; expected "Callable[[str], Generator[Never, None, None]]" [arg-type]
pydantic (https://github.com/pydantic/pydantic)
+ pydantic/_internal/_generics.py:385: error: Argument 1 to "contextmanager" has incompatible type "Callable[[type[BaseModel], tuple[Any, ...]], Iterator[PydanticRecursiveRef | None]]"; expected "Callable[[type[BaseModel], tuple[Any, ...]], Generator[Never, None, None]]" [arg-type]
+ pydantic/_internal/_generate_schema.py:526: error: Never object is not iterable [misc]
+ pydantic/_internal/_generate_schema.py:527: error: Cannot determine type of "maybe_schema" [has-type]
+ pydantic/_internal/_generate_schema.py:528: error: Cannot determine type of "maybe_schema" [has-type]
+ pydantic/_internal/_generate_schema.py:586: error: Cannot determine type of "model_ref" [has-type]
+ pydantic/_internal/_generate_schema.py:612: error: Cannot determine type of "model_ref" [has-type]
+ pydantic/_internal/_generate_schema.py:618: error: Cannot determine type of "model_ref" [has-type]
+ pydantic/_internal/_generate_schema.py:619: error: Cannot determine type of "model_ref" [has-type]
+ pydantic/_internal/_generate_schema.py:664: error: Never object is not iterable [misc]
+ pydantic/_internal/_generate_schema.py:665: error: Cannot determine type of "maybe_schema" [has-type]
+ pydantic/_internal/_generate_schema.py:666: error: Cannot determine type of "maybe_schema" [has-type]
- pydantic/_internal/_generate_schema.py:1243: error: Unused "type: ignore" comment [unused-ignore]
+ pydantic/_internal/_generate_schema.py:1229: error: Never object is not iterable [misc]
+ pydantic/_internal/_generate_schema.py:1230: error: Cannot determine type of "maybe_schema" [has-type]
+ pydantic/_internal/_generate_schema.py:1231: error: Cannot determine type of "maybe_schema" [has-type]
+ pydantic/_internal/_generate_schema.py:1244: error: Cannot determine type of "ref" [has-type]
+ pydantic/_internal/_generate_schema.py:1245: error: Cannot determine type of "ref" [has-type]
+ pydantic/_internal/_generate_schema.py:1278: error: Never object is not iterable [misc]
+ pydantic/_internal/_generate_schema.py:1282: error: Cannot determine type of "maybe_schema" [has-type]
+ pydantic/_internal/_generate_schema.py:1283: error: Cannot determine type of "maybe_schema" [has-type]
+ pydantic/_internal/_generate_schema.py:1358: error: Cannot determine type of "typed_dict_ref" [has-type]
+ pydantic/_internal/_generate_schema.py:1365: error: Cannot determine type of "typed_dict_ref" [has-type]
+ pydantic/_internal/_generate_schema.py:1366: error: Cannot determine type of "typed_dict_ref" [has-type]
+ pydantic/_internal/_generate_schema.py:1370: error: Never object is not iterable [misc]
+ pydantic/_internal/_generate_schema.py:1374: error: Cannot determine type of "maybe_schema" [has-type]
+ pydantic/_internal/_generate_schema.py:1375: error: Cannot determine type of "maybe_schema" [has-type]
+ pydantic/_internal/_generate_schema.py:1402: error: Cannot determine type of "namedtuple_ref" [has-type]
+ pydantic/_internal/_generate_schema.py:1570: error: Never object is not iterable [misc]
+ pydantic/_internal/_generate_schema.py:1574: error: Cannot determine type of "maybe_schema" [has-type]
+ pydantic/_internal/_generate_schema.py:1575: error: Cannot determine type of "maybe_schema" [has-type]
+ pydantic/_internal/_generate_schema.py:1657: error: Cannot determine type of "dataclass_ref" [has-type]
+ pydantic/_internal/_generate_schema.py:1665: error: Cannot determine type of "dataclass_ref" [has-type]
+ pydantic/_internal/_generate_schema.py:1666: error: Cannot determine type of "dataclass_ref" [has-type]
+ pydantic/_internal/_generate_schema.py:2307: error: Argument 1 to "contextmanager" has incompatible type "Callable[[_Definitions, Any], Iterator[tuple[str, None] | tuple[str, Any]]]"; expected "Callable[[_Definitions, Any], Generator[Never, None, None]]" [arg-type]
+ pydantic/_internal/_generate_schema.py:2354: error: Argument 1 to "contextmanager" has incompatible type "Callable[[_FieldNameStack, str], Iterator[None]]"; expected "Callable[[_FieldNameStack, str], Generator[Never, None, None]]" [arg-type]
+ pydantic/_internal/_generate_schema.py:2373: error: Argument 1 to "contextmanager" has incompatible type "Callable[[_ModelTypeStack, type], Iterator[None]]"; expected "Callable[[_ModelTypeStack, type], Generator[Never, None, None]]" [arg-type]
+ pydantic/main.py:729: error: Need type annotation for "maybe_self_type" [var-annotated]
+ pydantic/type_adapter.py:266: error: Argument 1 to "contextmanager" has incompatible type "Callable[[TypeAdapter[T], int], Iterator[None]]"; expected "Callable[[TypeAdapter[T], int], Generator[Never, None, None]]" [arg-type]
pybind11 (https://github.com/pybind/pybind11)
+ pybind11/setup_helpers.py:212: error: Argument 1 to "contextmanager" has incompatible type "Callable[[], Iterator[str]]"; expected "Callable[[], Generator[Never, None, None]]" [arg-type]
packaging (https://github.com/pypa/packaging)
+ src/packaging/_tokenizer.py:173: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Tokenizer, str, str, NamedArg(str, 'around')], Iterator[None]]"; expected "Callable[[Tokenizer, str, str, NamedArg(str, 'around')], Generator[Never, None, None]]" [arg-type]
flake8-pyi (https://github.com/PyCQA/flake8-pyi)
+ pyi.py:1001: error: Argument 1 to "contextmanager" has incompatible type "Callable[[NestingCounter], Iterator[None]]"; expected "Callable[[NestingCounter], Generator[Never, None, None]]" [arg-type]
websockets (https://github.com/aaugustin/websockets)
+ src/websockets/sync/connection.py:623: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Connection, DefaultNamedArg(State, 'expected_state')], Iterator[None]]"; expected "Callable[[Connection, DefaultNamedArg(State, 'expected_state')], Generator[Never, None, None]]" [arg-type]
comtypes (https://github.com/enthought/comtypes)
+ comtypes/test/test_findgendir.py:19: error: Argument 1 to "contextmanager" has incompatible type "Callable[[], Iterator[Module]]"; expected "Callable[[], Generator[Never, None, None]]" [arg-type]
+ comtypes/test/test_client_regenerate_modules.py:27: error: Argument 1 to "contextmanager" has incompatible type "Callable[[], Iterator[Path]]"; expected "Callable[[], Generator[Never, None, None]]" [arg-type]
+ comtypes/test/test_client_regenerate_modules.py:40: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Path], Iterator[Module]]"; expected "Callable[[Path], Generator[Never, None, None]]" [arg-type]
+ comtypes/test/test_client_regenerate_modules.py:83: error: Argument 1 to "contextmanager" has incompatible type "Callable[[], Iterator[Path]]"; expected "Callable[[], Generator[Never, None, None]]" [arg-type]
+ comtypes/test/test_client_regenerate_modules.py:85: error: Need type annotation for "tmp_gen_dir" [var-annotated]
mypy-protobuf (https://github.com/dropbox/mypy-protobuf)
+ mypy_protobuf/main.py:227: error: Argument 1 to "contextmanager" has incompatible type "Callable[[PkgWriter], Iterator[None]]"; expected "Callable[[PkgWriter], Generator[Never, None, None]]" [arg-type]
+ mypy_protobuf/main.py:1036: error: Argument 1 to "contextmanager" has incompatible type "Callable[[], Iterator[tuple[CodeGeneratorRequest, CodeGeneratorResponse]]]"; expected "Callable[[], Generator[Never, None, None]]" [arg-type]
+ mypy_protobuf/main.py:1066: error: Never object is not iterable [misc]
+ mypy_protobuf/main.py:1068: error: Cannot determine type of "request" [has-type]
+ mypy_protobuf/main.py:1069: error: Cannot determine type of "response" [has-type]
+ mypy_protobuf/main.py:1070: error: Cannot determine type of "request" [has-type]
+ mypy_protobuf/main.py:1071: error: Cannot determine type of "request" [has-type]
+ mypy_protobuf/main.py:1072: error: Cannot determine type of "request" [has-type]
+ mypy_protobuf/main.py:1078: error: Never object is not iterable [misc]
+ mypy_protobuf/main.py:1080: error: Cannot determine type of "request" [has-type]
+ mypy_protobuf/main.py:1081: error: Cannot determine type of "response" [has-type]
+ mypy_protobuf/main.py:1082: error: Cannot determine type of "request" [has-type]
+ mypy_protobuf/main.py:1083: error: Cannot determine type of "request" [has-type]
+ mypy_protobuf/main.py:1084: error: Cannot determine type of "request" [has-type]
scrapy (https://github.com/scrapy/scrapy)
+ scrapy/utils/misc.py:231: error: Argument 1 to "contextmanager" has incompatible type "Callable[[KwArg(str)], Iterator[None]]"; expected "Callable[[KwArg(str)], Generator[Never, None, None]]" [arg-type]
+ tests/test_commands.py:676: error: Argument 1 to "contextmanager" has incompatible type "Callable[[RunSpiderCommandTest, Any, Any], Iterator[str]]"; expected "Callable[[RunSpiderCommandTest, Any, Any], Generator[Never, None, None]]" [arg-type]
mongo-python-driver (https://github.com/mongodb/mongo-python-driver)
+ pymongo/synchronous/encryption.py:105: error: Argument 1 to "contextmanager" has incompatible type "Callable[[], Iterator[None]]"; expected "Callable[[], Generator[Never, None, None]]" [arg-type]
+ pymongo/asynchronous/encryption.py:105: error: Argument 1 to "contextmanager" has incompatible type "Callable[[], Iterator[None]]"; expected "Callable[[], Generator[Never, None, None]]" [arg-type]
pwndbg (https://github.com/pwndbg/pwndbg)
+ pwndbg/gdblib/scheduler.py:9: error: Argument 1 to "contextmanager" has incompatible type "Callable[[], Iterator[None]]"; expected "Callable[[], Generator[Never, None, None]]" [arg-type]
+ pwndbg/wrappers/checksec.py:12: error: Argument 1 to "contextmanager" has incompatible type "Callable[[], Iterator[None]]"; expected "Callable[[], Generator[Never, None, None]]" [arg-type]
poetry (https://github.com/python-poetry/poetry)
+ src/poetry/config/file_config_source.py:34: error: Need type annotation for "toml" [var-annotated]
+ src/poetry/config/file_config_source.py:49: error: Need type annotation for "toml" [var-annotated]
+ src/poetry/config/file_config_source.py:65: error: Argument 1 to "contextmanager" has incompatible type "Callable[[FileConfigSource], Iterator[Any]]"; expected "Callable[[FileConfigSource], Generator[Never, None, None]]" [arg-type]
+ src/poetry/inspection/lazy_wheel.py:456: error: Argument 1 to "contextmanager" has incompatible type "Callable[[LazyFileOverHTTP], Iterator[None]]"; expected "Callable[[LazyFileOverHTTP], Generator[Never, None, None]]" [arg-type]
+ src/poetry/utils/helpers.py:64: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Path], Iterator[Path]]"; expected "Callable[[Path], Generator[Never, None, None]]" [arg-type]
+ src/poetry/utils/helpers.py:145: error: Need type annotation for "update_context" [var-annotated]
+ src/poetry/utils/env/virtual_env.py:121: error: Argument 1 to "contextmanager" has incompatible type "Callable[[VirtualEnv], Iterator[None]]"; expected "Callable[[VirtualEnv], Generator[Never, None, None]]" [arg-type]
+ src/poetry/utils/env/__init__.py:40: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Path | None, dict[str, str | bool] | None], Iterator[VirtualEnv]]"; expected "Callable[[Path | None, dict[str, str | bool] | None], Generator[Never, None, None]]" [arg-type]
+ src/poetry/utils/env/__init__.py:56: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Poetry, Env | None, Any | None], Iterator[Env]]"; expected "Callable[[Poetry, Env | None, Any | None], Generator[Never, None, None]]" [arg-type]
+ src/poetry/utils/env/__init__.py:68: error: Need type annotation for "venv" [var-annotated]
+ src/poetry/utils/isolated_build.py:108: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Path, Any, Path | None, RepositoryPool | None], Iterator[Any]]"; expected "Callable[[Path, Any, Path | None, RepositoryPool | None], Generator[Never, None, None]]" [arg-type]
+ src/poetry/utils/isolated_build.py:137: error: Need type annotation for "venv" [var-annotated]
+ src/poetry/masonry/builders/editable.py:84: error: Need type annotation for "env" [var-annotated]
+ src/poetry/installation/chef.py:57: error: Need type annotation for "builder" [var-annotated]
+ src/poetry/inspection/info.py:539: error: Need type annotation for "builder" [var-annotated]
+ src/poetry/repositories/http_repository.py:101: error: Argument 1 to "contextmanager" has incompatible type "Callable[[HTTPRepository, Any, DefaultNamedArg(bool, 'raise_accepts_ranges')], Iterator[Path]]"; expected "Callable[[HTTPRepository, Any, DefaultNamedArg(bool, 'raise_accepts_ranges')], Generator[Never, None, None]]" [arg-type]
+ src/poetry/repositories/http_repository.py:140: error: Need type annotation for "filepath" [var-annotated]
+ src/poetry/repositories/http_repository.py:159: error: Need type annotation for "filepath" [var-annotated]
+ src/poetry/repositories/http_repository.py:372: error: Need type annotation for "filepath" [var-annotated]
+ src/poetry/puzzle/provider.py:86: error: Argument 1 to "contextmanager" has incompatible type "Callable[[], Iterator[Callable[[str | None], None]]]"; expected "Callable[[], Generator[Never, None, None]]" [arg-type]
+ src/poetry/puzzle/provider.py:165: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Provider, Path], Iterator[Provider]]"; expected "Callable[[Provider, Path], Generator[Never, None, None]]" [arg-type]
+ src/poetry/puzzle/provider.py:175: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Provider, Env], Iterator[Provider]]"; expected "Callable[[Provider, Env], Generator[Never, None, None]]" [arg-type]
+ src/poetry/puzzle/provider.py:188: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Provider, Collection[Any]], Iterator[Provider]]"; expected "Callable[[Provider, Collection[Any]], Generator[Never, None, None]]" [arg-type]
+ src/poetry/puzzle/solver.py:60: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Solver, Env], Iterator[None]]"; expected "Callable[[Solver, Env], Generator[Never, None, None]]" [arg-type]
+ src/poetry/puzzle/solver.py:104: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Solver], Iterator[None]]"; expected "Callable[[Solver], Generator[Never, None, None]]" [arg-type]
+ src/poetry/console/commands/build.py:79: error: Need type annotation for "env" [var-annotated]
+ tests/helpers.py:231: error: Argument 1 to "contextmanager" has incompatible type "Callable[[dict[str, Any] | None, bool], Iterator[None]]"; expected "Callable[[dict[str, Any] | None, bool], Generator[Never, None, None]]" [arg-type]
+ tests/helpers.py:331: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Path, bool], Iterator[Path]]"; expected "Callable[[Path, bool], Generator[Never, None, None]]" [arg-type]
+ tests/helpers.py:345: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Path, Path | None], Iterator[Path]]"; expected "Callable[[Path, Path | None], Generator[Never, None, None]]" [arg-type]
+ tests/helpers.py:353: error: Need type annotation for "path" [var-annotated]
+ tests/utils/env/test_env.py:483: error: Need type annotation for "project_env" [var-annotated]
+ tests/utils/env/test_env.py:505: error: Need type annotation for "env" [var-annotated]
+ tests/utils/env/test_env.py:507: error: Unused "type: ignore" comment [unused-ignore]
+ tests/repositories/test_legacy_repository.py:535: error: Need type annotation for "filepath" [var-annotated]
+ tests/masonry/builders/test_editable_builder.py:263: error: Need type annotation for "venv" [var-annotated]
+ tests/conftest.py:542: error: Argument 1 to "contextmanager" has incompatible type "Callable[[str | Path, bool], Iterator[Path]]"; expected "Callable[[str | Path, bool], Generator[Never, None, None]]" [arg-type]
+ tests/conftest.py:547: error: Need type annotation for "path" [var-annotated]
+ tests/utils/test_isolated_build.py:47: error: Need type annotation for "venv" [var-annotated]
+ tests/utils/test_isolated_build.py:69: error: Need type annotation for "venv" [var-annotated]
+ tests/utils/test_isolated_build.py:79: error: Need type annotation for "venv" [var-annotated]
+ tests/utils/test_isolated_build.py:94: error: Need type annotation for "builder" [var-annotated]
+ tests/repositories/test_installed_repository.py:37: error: Need type annotation for "path" [var-annotated]
+ tests/repositories/fixtures/pypi.org/generate.py:313: error: Need type annotation for "src" [var-annotated]
+ tests/repositories/fixtures/pypi.org/generate.py:328: error: Need type annotation for "src" [var-annotated]
+ tests/repositories/fixtures/pypi.org/generate.py:353: error: Need type annotation for "src" [var-annotated]
cki-lib (https://gitlab.com/cki-project/cki-lib)
+ cki_lib/logger.py:25: error: Argument 1 to "contextmanager" has incompatible type "Callable[[dict[str, Any]], Iterator[None]]"; expected "Callable[[dict[str, Any]], Generator[Never, None, None]]" [arg-type]
+ tests/test_yaml.py:154: error: Argument 1 to "contextmanager" has incompatible type "Callable[[str],
... (truncated 416 lines) ...
Diff from mypy_primer, showing the effect of this PR on open source code:
beartype (https://github.com/beartype/beartype)
+ beartype/_util/error/utilerrwarn.py:40: error: Argument 1 to "contextmanager" has incompatible type "Callable[[], Iterator[None]]"; expected "Callable[[], Generator[Never, None, None]]" [arg-type]
+ beartype/_data/module/datamodcontextlib.py:19: error: Argument 1 to "contextmanager" has incompatible type "Callable[[], Iterator[None]]"; expected "Callable[[], Generator[Never, None, None]]" [arg-type]
+ beartype/claw/_pkg/clawpkgcontext.py:37: error: Argument 1 to "contextmanager" has incompatible type "Callable[[DefaultNamedArg(BeartypeConf, 'conf')], Iterator[None]]"; expected "Callable[[DefaultNamedArg(BeartypeConf, 'conf')], Generator[Never, None, None]]" [arg-type]
+ beartype/claw/_pkg/clawpkgcontext.py:134: error: Argument 1 to "contextmanager" has incompatible type "Callable[[], Iterator[None]]"; expected "Callable[[], Generator[Never, None, None]]" [arg-type]
anyio (https://github.com/agronholm/anyio)
+ src/anyio/pytest_plugin.py:29: error: Argument 1 to "contextmanager" has incompatible type "Callable[[str, dict[str, Any]], Iterator[TestRunner]]"; expected "Callable[[str, dict[str, Any]], Generator[Never, None, None]]" [arg-type]
+ src/anyio/pytest_plugin.py:73: error: Need type annotation for "runner" [var-annotated]
+ src/anyio/pytest_plugin.py:104: error: Need type annotation for "runner" [var-annotated]
+ src/anyio/pytest_plugin.py:123: error: Need type annotation for "runner" [var-annotated]
stone (https://github.com/dropbox/stone)
+ stone/backend.py:143: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Backend, str, str], Iterator[None]]"; expected "Callable[[Backend, str, str], Generator[Never, None, None]]" [arg-type]
+ stone/backend.py:184: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Backend, int | None], Iterator[None]]"; expected "Callable[[Backend, int | None], Generator[Never, None, None]]" [arg-type]
+ stone/backend.py:212: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Backend, StringIO], Iterator[None]]"; expected "Callable[[Backend, StringIO], Generator[Never, None, None]]" [arg-type]
+ stone/backend.py:442: error: Argument 1 to "contextmanager" has incompatible type "Callable[[CodeBackend, str, str, tuple[str, str], int | None, bool], Iterator[None]]"; expected "Callable[[CodeBackend, str, str, tuple[str, str], int | None, bool], Generator[Never, None, None]]" [arg-type]
+ stone/backends/python_helpers.py:55: error: Argument 1 to "contextmanager" has incompatible type "Callable[[CodeBackend], Iterator[None]]"; expected "Callable[[CodeBackend], Generator[Never, None, None]]" [arg-type]
boostedblob (https://github.com/hauntsaninja/boostedblob)
+ boostedblob/globals.py:203: error: Argument 1 to "contextmanager" has incompatible type "Callable[[KwArg(Any)], Iterator[None]]"; expected "Callable[[KwArg(Any)], Generator[Never, None, None]]" [arg-type]
kopf (https://github.com/nolar/kopf)
+ kopf/_core/actions/invocation.py:73: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Iterable[tuple[ContextVar[Any], Any]]], Iterator[None]]"; expected "Callable[[Iterable[tuple[ContextVar[Any], Any]]], Generator[Never, None, None]]" [arg-type]
sphinx (https://github.com/sphinx-doc/sphinx)
+ sphinx/util/osutil.py:164:2: error: Argument 1 to "contextmanager" has incompatible type "Callable[[str], Iterator[None]]"; expected "Callable[[str], Generator[Never, None, None]]" [arg-type]
+ sphinx/util/parsing.py:69:2: error: Argument 1 to "contextmanager" has incompatible type "Callable[[RSTState], Iterator[None]]"; expected "Callable[[RSTState], Generator[Never, None, None]]" [arg-type]
+ sphinx/util/logging.py:248:2: error: Argument 1 to "contextmanager" has incompatible type "Callable[[], Iterator[Handler]]"; expected "Callable[[], Generator[Never, None, None]]" [arg-type]
+ sphinx/util/logging.py:276:2: error: Argument 1 to "contextmanager" has incompatible type "Callable[[], Iterator[MemoryHandler]]"; expected "Callable[[], Generator[Never, None, None]]" [arg-type]
+ sphinx/util/logging.py:305:2: error: Argument 1 to "contextmanager" has incompatible type "Callable[[], Iterator[MemoryHandler]]"; expected "Callable[[], Generator[Never, None, None]]" [arg-type]
+ sphinx/util/logging.py: note: In function "pending_logging":
+ sphinx/util/logging.py:319:14: error: Need type annotation for "memhandler" [var-annotated]
+ sphinx/util/logging.py: note: At top level:
+ sphinx/util/logging.py:325:2: error: Argument 1 to "contextmanager" has incompatible type "Callable[[bool], Iterator[None]]"; expected "Callable[[bool], Generator[Never, None, None]]" [arg-type]
+ sphinx/util/logging.py:345:2: error: Argument 1 to "contextmanager" has incompatible type "Callable[[str], Iterator[None]]"; expected "Callable[[str], Generator[Never, None, None]]" [arg-type]
+ sphinx/util/logging.py: note: In class "LogCollector":
+ sphinx/util/logging.py:395:6: error: Argument 1 to "contextmanager" has incompatible type "Callable[[LogCollector], Iterator[None]]"; expected "Callable[[LogCollector], Generator[Never, None, None]]" [arg-type]
+ sphinx/util/logging.py: note: In member "collect" of class "LogCollector":
+ sphinx/util/logging.py:397:14: error: Need type annotation for "memhandler" [var-annotated]
+ sphinx/util/docutils.py:45:2: error: Argument 1 to "contextmanager" has incompatible type "Callable[[], Iterator[None]]"; expected "Callable[[], Generator[Never, None, None]]" [arg-type]
+ sphinx/util/docutils.py:123:2: error: Argument 1 to "contextmanager" has incompatible type "Callable[[], Iterator[None]]"; expected "Callable[[], Generator[Never, None, None]]" [arg-type]
+ sphinx/util/docutils.py:143:2: error: Argument 1 to "contextmanager" has incompatible type "Callable[[], Iterator[None]]"; expected "Callable[[], Generator[Never, None, None]]" [arg-type]
+ sphinx/util/docutils.py:167:2: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Optional[str]], Iterator[None]]"; expected "Callable[[Optional[str]], Generator[Never, None, None]]" [arg-type]
+ sphinx/util/docutils.py:183:2: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Optional[str]], Iterator[None]]"; expected "Callable[[Optional[str]], Generator[Never, None, None]]" [arg-type]
+ sphinx/util/docutils.py:327:2: error: Argument 1 to "contextmanager" has incompatible type "Callable[[State[Any], StringList], Iterator[None]]"; expected "Callable[[State[Any], StringList], Generator[Never, None, None]]" [arg-type]
+ sphinx/util/rst.py:63:2: error: Argument 1 to "contextmanager" has incompatible type "Callable[[str, str], Iterator[None]]"; expected "Callable[[str, str], Generator[Never, None, None]]" [arg-type]
+ sphinx/ext/autodoc/mock.py:142:2: error: Argument 1 to "contextmanager" has incompatible type "Callable[[list[str]], Iterator[None]]"; expected "Callable[[list[str]], Generator[Never, None, None]]" [arg-type]
xarray (https://github.com/pydata/xarray)
+ xarray/tests/test_backends.py: note: In member "test_dtype_coercion_error" of class "NetCDF3Only":
+ xarray/tests/test_backends.py:294: error: Need type annotation for "path" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "roundtrip" of class "DatasetIOBase":
+ xarray/tests/test_backends.py:314: error: Need type annotation for "path" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "roundtrip_append" of class "DatasetIOBase":
+ xarray/tests/test_backends.py:327: error: Need type annotation for "path" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_grid_mapping_and_bounds_are_not_coordinates_in_file" of class "CFEncodedBase":
+ xarray/tests/test_backends.py:1013: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_coordinates_encoding" of class "CFEncodedBase":
+ xarray/tests/test_backends.py:1081: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_append_overwrite_values" of class "CFEncodedBase":
+ xarray/tests/test_backends.py:1257: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_append_with_invalid_dim_raises" of class "CFEncodedBase":
+ xarray/tests/test_backends.py:1267: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_refresh_from_disk" of class "NetCDFBase":
+ xarray/tests/test_backends.py:1299: error: Need type annotation for "example_1_path" [var-annotated]
+ xarray/tests/test_backends.py:1300: error: Need type annotation for "example_1_modified_path" [var-annotated]
+ xarray/tests/test_backends.py: note: At top level:
+ xarray/tests/test_backends.py:1325: error: Argument 1 to "contextmanager" has incompatible type "Callable[[str, bool], Iterator[str]]"; expected "Callable[[str, bool], Generator[Never, None, None]]" [arg-type]
+ xarray/tests/test_backends.py:1341: error: Argument 1 to "contextmanager" has incompatible type "Callable[[int, str, bool], Iterator[list[str]]]"; expected "Callable[[int, str, bool], Generator[Never, None, None]]" [arg-type]
+ xarray/tests/test_backends.py: note: In function "create_tmp_files":
+ xarray/tests/test_backends.py:1346: error: Need type annotation for "files" (hint: "files: list[<type>] = ...") [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_open_group" of class "NetCDF4Base":
+ xarray/tests/test_backends.py:1360: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_open_subgroup" of class "NetCDF4Base":
+ xarray/tests/test_backends.py:1386: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_write_groups" of class "NetCDF4Base":
+ xarray/tests/test_backends.py:1408: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_roundtrip_character_array" of class "NetCDF4Base":
+ xarray/tests/test_backends.py:1451: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_open_encodings" of class "NetCDF4Base":
+ xarray/tests/test_backends.py:1478: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_dump_and_open_encodings" of class "NetCDF4Base":
+ xarray/tests/test_backends.py:1512: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py:1521: error: Need type annotation for "tmp_file2" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_mask_and_scale" of class "NetCDF4Base":
+ xarray/tests/test_backends.py:1674: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_0dimensional_variable" of class "NetCDF4Base":
+ xarray/tests/test_backends.py:1702: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_read_variable_len_strings" of class "NetCDF4Base":
+ xarray/tests/test_backends.py:1712: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_encoding_enum__no_fill_value" of class "NetCDF4Base":
+ xarray/tests/test_backends.py:1751: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_encoding_enum__multiple_variable_with_enum" of class "NetCDF4Base":
+ xarray/tests/test_backends.py:1782: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_encoding_enum__error_multiple_variable_with_changing_enum" of class "NetCDF4Base":
+ xarray/tests/test_backends.py:1829: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "create_store" of class "TestNetCDF4Data":
+ xarray/tests/test_backends.py:1874: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_base_case" of class "TestNetCDF4AlreadyOpen":
+ xarray/tests/test_backends.py:2005: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_group" of class "TestNetCDF4AlreadyOpen":
+ xarray/tests/test_backends.py:2017: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_deepcopy" of class "TestNetCDF4AlreadyOpen":
+ xarray/tests/test_backends.py:2041: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: At top level:
+ xarray/tests/test_backends.py: note: In member "create_zarr_target" of class "TestZarrDirectoryStore":
+ xarray/tests/test_backends.py:3201: error: Need type annotation for "tmp" [var-annotated]
+ xarray/tests/test_backends.py: note: In class "TestZarrWriteEmpty":
+ xarray/tests/test_backends.py:3217: error: Argument 1 to "contextmanager" has incompatible type "Callable[[TestZarrWriteEmpty], Iterator[tuple[str, str]]]"; expected "Callable[[TestZarrWriteEmpty], Generator[Never, None, None]]" [arg-type]
+ xarray/tests/test_backends.py:3223: error: Argument 1 to "contextmanager" has incompatible type "Callable[[TestZarrWriteEmpty, Any, Any, Any, Any, Any], Iterator[Dataset]]"; expected "Callable[[TestZarrWriteEmpty, Any, Any, Any, Any, Any], Generator[Never, None, None]]" [arg-type]
+ xarray/tests/test_backends.py: note: In member "test_write_empty" of class "TestZarrWriteEmpty":
+ xarray/tests/test_backends.py:3277: error: Never object is not iterable [misc]
+ xarray/tests/test_backends.py:3279: error: Cannot determine type of "store" [has-type]
+ xarray/tests/test_backends.py:3285: error: Need type annotation for "a_ds" [var-annotated]
+ xarray/tests/test_backends.py:3287: error: Cannot determine type of "store" [has-type]
+ xarray/tests/test_backends.py:3294: error: Cannot determine type of "store" [has-type]
+ xarray/tests/test_backends.py: note: In member "create_zarr_target" of class "TestZarrDirectoryStoreV3":
+ xarray/tests/test_backends.py:3358: error: Need type annotation for "tmp" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "create_zarr_target" of class "TestZarrDirectoryStoreV3FromPath":
+ xarray/tests/test_backends.py:3370: error: Need type annotation for "tmp" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "roundtrip" of class "TestScipyFileObject":
+ xarray/tests/test_backends.py:3423: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "create_store" of class "TestScipyFilePath":
+ xarray/tests/test_backends.py:3445: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_nc4_scipy" of class "TestScipyFilePath":
+ xarray/tests/test_backends.py:3468: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "create_store" of class "TestNetCDF3ViaNetCDF4Data":
+ xarray/tests/test_backends.py:3483: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "create_store" of class "TestNetCDF4ClassicViaNetCDF4Data":
+ xarray/tests/test_backends.py:3504: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_engine" of class "TestGenericNetCDFData":
+ xarray/tests/test_backends.py:3529: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_cross_engine_read_write_netcdf3" of class "TestGenericNetCDFData":
+ xarray/tests/test_backends.py:3548: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "create_store" of class "TestH5NetCDFData":
+ xarray/tests/test_backends.py:3592: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_cross_engine_read_write_netcdf4" of class "TestH5NetCDFData":
+ xarray/tests/test_backends.py:3631: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_read_byte_attrs_as_unicode" of class "TestH5NetCDFData":
+ xarray/tests/test_backends.py:3638: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_compression_check_encoding_h5py" of class "TestH5NetCDFData":
+ xarray/tests/test_backends.py:3704: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py:3722: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py:3732: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_decode_utf8_warning" of class "TestH5NetCDFData":
+ xarray/tests/test_backends.py:3765: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_open_dataset_group" of class "TestH5NetCDFAlreadyOpen":
+ xarray/tests/test_backends.py:3780: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_deepcopy" of class "TestH5NetCDFAlreadyOpen":
+ xarray/tests/test_backends.py:3803: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_open_twice" of class "TestH5NetCDFFileObject":
+ xarray/tests/test_backends.py:3844: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_open_fileobj" of class "TestH5NetCDFFileObject":
+ xarray/tests/test_backends.py:3856: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In function "test_open_mfdataset_manyfiles":
+ xarray/tests/test_backends.py:4021: error: Need type annotation for "tmpfiles" [var-annotated]
+ xarray/tests/test_backends.py: note: In function "test_open_mfdataset_list_attr":
+ xarray/tests/test_backends.py:4061: error: Need type annotation for "nfiles" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "setup_files_and_datasets" of class "TestOpenMFDatasetWithDataVarsAndCoordsKw":
+ xarray/tests/test_backends.py:4092: error: Need type annotation for "tmpfile1" [var-annotated]
+ xarray/tests/test_backends.py:4093: error: Need type annotation for "tmpfile2" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_open_mfdataset" of class "TestDask":
+ xarray/tests/test_backends.py:4354: error: Need type annotation for "tmp1" [var-annotated]
+ xarray/tests/test_backends.py:4355: error: Need type annotation for "tmp2" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_open_mfdataset_2d" of class "TestDask":
+ xarray/tests/test_backends.py:4384: error: Need type annotation for "tmp1" [var-annotated]
+ xarray/tests/test_backends.py:4385: error: Need type annotation for "tmp2" [var-annotated]
+ xarray/tests/test_backends.py:4386: error: Need type annotation for "tmp3" [var-annotated]
+ xarray/tests/test_backends.py:4387: error: Need type annotation for "tmp4" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_open_mfdataset_pathlib" of class "TestDask":
+ xarray/tests/test_backends.py:4413: error: Need type annotation for "tmps1" [var-annotated]
+ xarray/tests/test_backends.py:4414: error: Need type annotation for "tmps2" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_open_mfdataset_2d_pathlib" of class "TestDask":
+ xarray/tests/test_backends.py:4426: error: Need type annotation for "tmps1" [var-annotated]
+ xarray/tests/test_backends.py:4427: error: Need type annotation for "tmps2" [var-annotated]
+ xarray/tests/test_backends.py:4428: error: Need type annotation for "tmps3" [var-annotated]
+ xarray/tests/test_backends.py:4429: error: Need type annotation for "tmps4" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_open_mfdataset_2" of class "TestDask":
+ xarray/tests/test_backends.py:4447: error: Need type annotation for "tmp1" [var-annotated]
+ xarray/tests/test_backends.py:4448: error: Need type annotation for "tmp2" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_attrs_mfdataset" of class "TestDask":
+ xarray/tests/test_backends.py:4459: error: Need type annotation for "tmp1" [var-annotated]
+ xarray/tests/test_backends.py:4460: error: Need type annotation for "tmp2" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_open_mfdataset_attrs_file" of class "TestDask":
+ xarray/tests/test_backends.py:4479: error: Never object is not iterable [misc]
+ xarray/tests/test_backends.py:4484: error: Cannot determine type of "tmp1" [has-type]
+ xarray/tests/test_backends.py:4485: error: Cannot determine type of "tmp2" [has-type]
+ xarray/tests/test_backends.py:4487: error: Cannot determine type of "tmp1" [has-type]
+ xarray/tests/test_backends.py:4487: error: Cannot determine type of "tmp2" [has-type]
+ xarray/tests/test_backends.py: note: In member "test_open_mfdataset_attrs_file_path" of class "TestDask":
+ xarray/tests/test_backends.py:4496: error: Never object is not iterable [misc]
+ xarray/tests/test_backends.py:4497: error: Cannot determine type of "tmps1" [has-type]
+ xarray/tests/test_backends.py:4498: error: Cannot determine type of "tmps2" [has-type]
+ xarray/tests/test_backends.py: note: In member "test_open_mfdataset_auto_combine" of class "TestDask":
+ xarray/tests/test_backends.py:4515: error: Need type annotation for "tmp1" [var-annotated]
+ xarray/tests/test_backends.py:4516: error: Need type annotation for "tmp2" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_open_mfdataset_raise_on_bad_combine_args" of class "TestDask":
+ xarray/tests/test_backends.py:4526: error: Need type annotation for "tmp1" [var-annotated]
+ xarray/tests/test_backends.py:4527: error: Need type annotation for "tmp2" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_encoding_mfdataset" of class "TestDask":
+ xarray/tests/test_backends.py:4542: error: Need type annotation for "tmp1" [var-annotated]
+ xarray/tests/test_backends.py:4543: error: Need type annotation for "tmp2" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_preprocess_mfdataset" of class "TestDask":
+ xarray/tests/test_backends.py:4557: error: Need type annotation for "tmp" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_save_mfdataset_roundtrip" of class "TestDask":
+ xarray/tests/test_backends.py:4572: error: Need type annotation for "tmp1" [var-annotated]
+ xarray/tests/test_backends.py:4573: error: Need type annotation for "tmp2" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_save_mfdataset_pathlib_roundtrip" of class "TestDask":
+ xarray/tests/test_backends.py:4596: error: Need type annotation for "tmps1" [var-annotated]
+ xarray/tests/test_backends.py:4597: error: Need type annotation for "tmps2" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_open_and_do_math" of class "TestDask":
+ xarray/tests/test_backends.py:4631: error: Need type annotation for "tmp" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_open_mfdataset_concat_dim_none" of class "TestDask":
+ xarray/tests/test_backends.py:4638: error: Need type annotation for "tmp1" [var-annotated]
+ xarray/tests/test_backends.py:4639: error: Need type annotation for "tmp2" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_open_mfdataset_concat_dim_default_none" of class "TestDask":
+ xarray/tests/test_backends.py:4649: error: Need type annotation for "tmp1" [var-annotated]
+ xarray/tests/test_backends.py:4650: error: Need type annotation for "tmp2" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_open_dataset" of class "TestDask":
+ xarray/tests/test_backends.py:4659: error: Need type annotation for "tmp" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_open_single_dataset" of class "TestDask":
+ xarray/tests/test_backends.py:4680: error: Need type annotation for "tmp" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_open_multi_dataset" of class "TestDask":
+ xarray/tests/test_backends.py:4702: error: Need type annotation for "tmp1" [var-annotated]
+ xarray/tests/test_backends.py:4702: error: Need type annotation for "tmp2" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_dask_roundtrip" of class "TestDask":
+ xarray/tests/test_backends.py:4713: error: Need type annotation for "tmp" [var-annotated]
+ xarray/tests/test_backends.py:4719: error: Need type annotation for "tmp2" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_deterministic_names" of class "TestDask":
+ xarray/tests/test_backends.py:4725: error: Need type annotation for "tmp" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_save_mfdataset_compute_false_roundtrip" of class "TestDask":
+ xarray/tests/test_backends.py:4752: error: Need type annotation for "tmp1" [var-annotated]
+ xarray/tests/test_backends.py:4753: error: Need type annotation for "tmp2" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_load_dataset" of class "TestDask":
+ xarray/tests/test_backends.py:4765: error: Need type annotation for "tmp" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_load_dataarray" of class "TestDask":
+ xarray/tests/test_backends.py:4773: error: Need type annotation for "tmp" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_inline_array" of class "TestDask":
+ xarray/tests/test_backends.py:4786: error: Need type annotation for "tmp" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_compatible_to_netcdf" of class "TestPydap":
+ xarray/tests/test_backends.py:4876: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_validating_attrs" of class "TestValidateAttrs":
+ xarray/tests/test_backends.py:4995: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_dataarray_to_netcdf_no_name" of class "TestDataArrayToNetCDF":
+ xarray/tests/test_backends.py:5049: error: Need type annotation for "tmp" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_dataarray_to_netcdf_with_name" of class "TestDataArrayToNetCDF":
+ xarray/tests/test_backends.py:5058: error: Need type annotation for "tmp" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_dataarray_to_netcdf_coord_name_clash" of class "TestDataArrayToNetCDF":
+ xarray/tests/test_backends.py:5069: error: Need type annotation for "tmp" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_open_dataarray_options" of class "TestDataArrayToNetCDF":
+ xarray/tests/test_backends.py:5078: error: Need type annotation for "tmp" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_dataarray_to_netcdf_no_name_pathlib" of class "TestDataArrayToNetCDF":
+ xarray/tests/test_backends.py:5095: error: Need type annotation for "tmps" [var-annotated]
+ xarray/tests/test_backends.py: note: In function "test_no_warning_from_dask_effective_get":
+ xarray/tests/test_backends.py:5155: error: Need type annotation for "tmpfile" [var-annotated]
+ xarray/tests/test_backends.py: note: In function "test_source_encoding_always_present":
+ xarray/tests/test_backends.py:5166: error: Need type annotation for "tmp" [var-annotated]
+ xarray/tests/test_backends.py: note: In function "test_source_encoding_always_present_with_pathlib":
+ xarray/tests/test_backends.py:5177: error: Need type annotation for "tmp" [var-annotated]
+ xarray/tests/test_backends.py: note: In function "test_source_encoding_always_present_with_fsspec":
+ xarray/tests/test_backends.py:5190: error: Need type annotation for "tmp" [var-annotated]
+ xarray/tests/test_backends.py: note: In function "test_use_cftime_standard_calendar_default_in_range":
+ xarray/tests/test_backends.py:5223: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In function "test_use_cftime_standard_calendar_default_out_of_range":
+ xarray/tests/test_backends.py:5256: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In function "test_use_cftime_true":
+ xarray/tests/test_backends.py:5286: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In function "test_use_cftime_false_standard_calendar_in_range":
+ xarray/tests/test_backends.py:5317: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In function "test_use_cftime_false_standard_calendar_out_of_range":
+ xarray/tests/test_backends.py:5338: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In function "test_use_cftime_false_nonstandard_calendar":
+ xarray/tests/test_backends.py:5356: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_open_nczarr" of class "TestNCZarr":
+ xarray/tests/test_backends.py:5673: error: Need type annotation for "tmp" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_overwriting_nczarr" of class "TestNCZarr":
+ xarray/tests/test_backends.py:5679: error: Need type annotation for "tmp" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_raise_writing_to_nczarr" of class "TestNCZarr":
+ xarray/tests/test_backends.py:5692: error: Need type annotation for "tmp" [var-annotated]
+ xarray/tests/test_distributed.py: note: In function "test_dask_distributed_zarr_integration_test":
+ xarray/tests/test_distributed.py:232: error: Need type annotation for "filename" [var-annotated]
cloud-init (https://github.com/canonical/cloud-init)
+ tests/integration_tests/conftest.py:269: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Any, Any, IntegrationCloud], Iterator[IntegrationInstance]]"; expected "Callable[[Any, Any, IntegrationCloud], Generator[Never, None, None]]" [arg-type]
+ tests/integration_tests/conftest.py:325: error: Need type annotation for "client" [var-annotated]
+ tests/integration_tests/conftest.py:334: error: Need type annotation for "client" [var-annotated]
+ tests/integration_tests/conftest.py:343: error: Need type annotation for "client" [var-annotated]
trio (https://github.com/python-trio/trio)
+ src/trio/_core/_run.py:687: error: Argument 1 to "contextmanager" has incompatible type "Callable[[CancelScope], Iterator[None]]"; expected "Callable[[CancelScope], Generator[Never, None, None]]" [arg-type]
+ src/trio/_core/_tests/test_ki.py:132: error: Argument 1 to "contextmanager" has incompatible type "Callable[[], Iterator[None]]"; expected "Callable[[], Generator[Never, None, None]]" [arg-type]
+ src/trio/_tests/test_ssl.py:377: error: Argument 1 to "contextmanager" has incompatible type "Callable[[SSLContext, KwArg(Any)], Iterator[SSLStream[PyOpenSSLEchoStream]]]"; expected "Callable[[SSLContext, KwArg(Any)], Generator[Never, None, None]]" [arg-type]
+ src/trio/_tests/test_ssl.py:377: note: Error code "arg-type" not covered by "type: ignore" comment
+ src/trio/_tests/test_ssl.py:597: error: Need type annotation for "s" [var-annotated]
+ src/trio/_tests/test_ssl.py:649: error: Need type annotation for "s" [var-annotated]
+ src/trio/_core/_tests/test_thread_cache.py:109: error: Argument 1 to "contextmanager" has incompatible type "Callable[[], Iterator[None]]"; expected "Callable[[], Generator[Never, None, None]]" [arg-type]
dd-trace-py (https://github.com/DataDog/dd-trace-py)
+ ddtrace/opentelemetry/_trace.py:121: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Tracer, str, Any | None, Any, Mapping[str, Any] | None, Sequence[Any] | None, int | None, bool, bool, bool], Iterator[Any]]"; expected "Callable[[Tracer, str, Any | None, Any, Mapping[str, Any] | None, Sequence[Any] | None, int | None, bool, bool, bool], Generator[Never, None, None]]" [arg-type]
artigraph (https://github.com/artigraph/artigraph)
+ src/arti/internal/__init__.py:7: error: Argument 1 to "contextmanager" has incompatible type "Callable[[type[Exception], NamedArg(str, 'prefix')], Iterator[None]]"; expected "Callable[[type[Exception], NamedArg(str, 'prefix')], Generator[Never, None, None]]" [arg-type]
+ src/arti/backends/__init__.py:122: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Self], Iterator[Self]]"; expected "Callable[[Never], Generator[Never, None, None]]" [arg-type]
+ src/arti/backends/__init__.py:144: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Backend], Iterator[Any]]"; expected "Callable[[Backend], Generator[Never, None, None]]" [arg-type]
+ src/arti/graphs/__init__.py:238: error: Invalid self argument "BackendConnection" to attribute function "connect" with type "Callable[[Never], _GeneratorContextManager[Never]]" [misc]
+ src/arti/graphs/__init__.py:238: error: Need type annotation for "conn" [var-annotated]
+ src/arti/graphs/__init__.py:283: error: Invalid self argument "BackendConnection" to attribute function "connect" with type "Callable[[Never], _GeneratorContextManager[Never]]" [misc]
+ src/arti/graphs/__init__.py:283: error: Need type annotation for "conn" [var-annotated]
+ src/arti/graphs/__init__.py:353: error: Invalid self argument "BackendConnection" to attribute function "connect" with type "Callable[[Never], _GeneratorContextManager[Never]]" [misc]
+ src/arti/graphs/__init__.py:353: error: Need type annotation for "conn" [var-annotated]
+ src/arti/graphs/__init__.py:373: error: Invalid self argument "BackendConnection" to attribute function "connect" with type "Callable[[Never], _GeneratorContextManager[Never]]" [misc]
+ src/arti/graphs/__init__.py:373: error: Need type annotation for "conn" [var-annotated]
+ src/arti/graphs/__init__.py:384: error: Invalid self argument "BackendConnection" to attribute function "connect" with type "Callable[[Never], _GeneratorContextManager[Never]]" [misc]
+ src/arti/graphs/__init__.py:384: error: Need type annotation for "conn" [var-annotated]
+ src/arti/graphs/__init__.py:385: error: Returning Any from function declared to return "GraphSnapshot" [no-any-return]
+ src/arti/executors/local.py:24: error: Need type annotation for "backend" [var-annotated]
+ src/arti/backends/memory.py:136: error: Argument 1 to "contextmanager" has incompatible type "Callable[[MemoryBackend], Iterator[MemoryConnection]]"; expected "Callable[[MemoryBackend], Generator[Never, None, None]]" [arg-type]
+ tests/arti/graphs/test_graph.py:141: error: Need type annotation for "conn" [var-annotated]
+ tests/arti/graphs/test_graph.py:198: error: Need type annotation for "conn" [var-annotated]
+ tests/arti/graphs/test_graph.py:252: error: Need type annotation for "conn" [var-annotated]
+ tests/arti/graphs/test_graph.py:440: error: Need type annotation for "conn" [var-annotated]
mypy (https://github.com/python/mypy)
+ mypyc/crash.py:9: error: Argument 1 to "contextmanager" has incompatible type "Callable[[str, int], Iterator[None]]"; expected "Callable[[str, int], Generator[Never, None, None]]" [arg-type]
+ mypy/state.py:17: error: Argument 1 to "contextmanager" has incompatible type "Callable[[StrictOptionalState, bool], Iterator[None]]"; expected "Callable[[StrictOptionalState, bool], Generator[Never, None, None]]" [arg-type]
+ mypy/scope.py:57: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Scope, str], Iterator[None]]"; expected "Callable[[Scope, str], Generator[Never, None, None]]" [arg-type]
+ mypy/scope.py:67: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Scope, FuncBase], Iterator[None]]"; expected "Callable[[Scope, FuncBase], Generator[Never, None, None]]" [arg-type]
+ mypy/scope.py:105: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Scope, TypeInfo], Iterator[None]]"; expected "Callable[[Scope, TypeInfo], Generator[Never, None, None]]" [arg-type]
+ mypy/scope.py:119: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Scope, Tuple[str, Optional[TypeInfo], Optional[FuncBase]]], Iterator[None]]"; expected "Callable[[Scope, Tuple[str, Optional[TypeInfo], Optional[FuncBase]]], Generator[Never, None, None]]" [arg-type]
+ mypy/server/aststrip.py:263: error: Argument 1 to "contextmanager" has incompatible type "Callable[[NodeStripVisitor, TypeInfo], Iterator[None]]"; expected "Callable[[NodeStripVisitor, TypeInfo], Generator[Never, None, None]]" [arg-type]
+ mypy/server/aststrip.py:273: error: Argument 1 to "contextmanager" has incompatible type "Callable[[NodeStripVisitor, TypeInfo], Iterator[None]]"; expected "Callable[[NodeStripVisitor, TypeInfo], Generator[Never, None, None]]" [arg-type]
+ mypy/renaming.py:295: error: Argument 1 to "contextmanager" has incompatible type "Callable[[VariableRenameVisitor], Iterator[None]]"; expected "Callable[[VariableRenameVisitor], Generator[Never, None, None]]" [arg-type]
+ mypy/renaming.py:305: error: Argument 1 to "contextmanager" has incompatible type "Callable[[VariableRenameVisitor], Iterator[None]]"; expected "Callable[[VariableRenameVisitor], Generator[Never, None, None]]" [arg-type]
+ mypy/renaming.py:313: error: Argument 1 to "contextmanager" has incompatible type "Callable[[VariableRenameVisitor], Iterator[None]]"; expected "Callable[[VariableRenameVisitor], Generator[Never, None, None]]" [arg-type]
+ mypy/renaming.py:324: error: Argument 1 to "contextmanager" has incompatible type "Callable[[VariableRenameVisitor, int], Iterator[None]]"; expected "Callable[[VariableRenameVisitor, int], Generator[Never, None, None]]" [arg-type]
+ mypy/renaming.py:537: error: Argument 1 to "contextmanager" has incompatible type "Callable[[LimitedVariableRenameVisitor], Iterator[None]]"; expected "Callable[[LimitedVariableRenameVisitor], Generator[Never, None, None]]" [arg-type]
+ mypy/stubutil.py:132: error: Argument 1 to "contextmanager" has incompatible type "Callable[[str, str, bool, bool], Iterator[None]]"; expected "Callable[[str, str, bool, bool], Generator[Never, None, None]]" [arg-type]
+ mypy/subtypes.py:183: error: Argument 1 to "pop_on_exit" has incompatible type "List[Tuple[Type, Type]]"; expected "List[Tuple[Never, Never]]" [arg-type]
+ mypy/subtypes.py:183: error: Argument 2 to "pop_on_exit" has incompatible type "Type"; expected Never [arg-type]
+ mypy/subtypes.py:183: error: Argument 3 to "pop_on_exit" has incompatible type "Type"; expected Never [arg-type]
+ mypy/subtypes.py:220: error: Argument 1 to "pop_on_exit" has incompatible type "List[Tuple[Type, Type]]"; expected "List[Tuple[Never, Never]]" [arg-type]
+ mypy/subtypes.py:220: error: Argument 2 to "pop_on_exit" has incompatible type "Type"; expected Never [arg-type]
+ mypy/subtypes.py:220: error: Argument 3 to "pop_on_exit" has incompatible type "Type"; expected Never [arg-type]
+ mypy/subtypes.py:1101: error: Argument 1 to "contextmanager" has incompatible type "Callable[[List[Tuple[T, T]], T, T], Iterator[None]]"; expected "Callable[[List[Tuple[Never, Never]], Never, Never], Generator[Never, None, None]]" [arg-type]
+ mypy/subtypes.py:1151: error: Argument 1 to "pop_on_exit" has incompatible type "List[Tuple[Instance, Instance]]"; expected "List[Tuple[Never, Never]]" [arg-type]
+ mypy/subtypes.py:1151: error: Argument 2 to "pop_on_exit" has incompatible type "Instance"; expected Never [arg-type]
+ mypy/subtypes.py:1151: error: Argument 3 to "pop_on_exit" has incompatible type "Instance"; expected Never [arg-type]
+ mypy/messages.py:198: error: Argument 1 to "contextmanager" has incompatible type "Callable[[MessageBuilder], Iterator[None]]"; expected "Callable[[MessageBuilder], Generator[Never, None, None]]" [arg-type]
+ mypy/binder.py:266: error: Argument 1 to "contextmanager" has incompatible type "Callable[[ConditionalTypeBinder], Iterator[defaultdict[Expression, List[Tuple[Type, Optional[Type]]]]]]"; expected "Callable[[ConditionalTypeBinder], Generator[Never, None, None]]" [arg-type]
+ mypy/binder.py:401: error: Argument 1 to "contextmanager" has incompatible type "Callable[[ConditionalTypeBinder, NamedArg(bool, 'can_skip'), DefaultNamedArg(int, 'fall_through'), DefaultNamedArg(int, 'break_frame'), DefaultNamedArg(int, 'continue_frame'), DefaultNamedArg(bool, 'conditional_frame'), DefaultNamedArg(bool, 'try_frame')], Iterator[Frame]]"; expected "Callable[[ConditionalTypeBinder, NamedArg(bool, 'can_skip'), DefaultNamedArg(int, 'fall_through'), DefaultNamedArg(int, 'break_frame'), DefaultNamedArg(int, 'continue_frame'), DefaultNamedArg(bool, 'conditional_frame'), DefaultNamedArg(bool, 'try_frame')], Generator[Never, None, None]]" [arg-type]
+ mypy/binder.py:459: error: Argument 1 to "contextmanager" has incompatible type "Callable[[ConditionalTypeBinder], Iterator[Frame]]"; expected "Callable[[ConditionalTypeBinder], Generator[Never, None, None]]" [arg-type]
+ mypy/typeanal.py:1699: error: Argument 1 to "contextmanager" has incompatible type "Callable[[TypeAnalyser, str], Iterator[None]]"; expected "Callable[[TypeAnalyser, str], Generator[Never, None, None]]" [arg-type]
+ mypy/semanal_namedtuple.py:664: error: Argument 1 to "contextmanager" has incompatible type "Callable[[NamedTupleAnalyzer, TypeInfo], Iterator[None]]"; expected "Callable[[NamedTupleAnalyzer, TypeInfo], Generator[Never, None, None]]" [arg-type]
+ mypy/semanal.py:504: error: Argument 1 to "contextmanager" has incompatible type "Callable[[SemanticAnalyzer], Iterator[None]]"; expected "Callable[[SemanticAnalyzer], Generator[Never, None, None]]" [arg-type]
+ mypy/semanal.py:795: error: Argument 1 to "contextmanager" has incompatible type "Callable[[SemanticAnalyzer, MypyFile, Options, Optional[TypeInfo]], Iterator[None]]"; expected "Callable[[SemanticAnalyzer, MypyFile, Options, Optional[TypeInfo]], Generator[Never, None, None]]" [arg-type]
+ mypy/semanal.py:1187: error: Argument 1 to "contextmanager" has incompatible type "Callable[[SemanticAnalyzer, Optional[int]], Iterator[None]]"; expected "Callable[[SemanticAnalyzer, Optional[int]], Generator[Never, None, None]]" [arg-type]
+ mypy/semanal.py:6727: error: Argument 1 to "contextmanager" has incompatible type "Callable[[SemanticAnalyzer, TypeVarLikeScope], Iterator[None]]"; expected "Callable[[SemanticAnalyzer, TypeVarLikeScope], Generator[Never, None, None]]" [arg-type]
+ mypy/semanal.py:6849: error: Argument 1 to "contextmanager" has incompatible type "Callable[[SemanticAnalyzer, Union[FuncItem, GeneratorExpr, DictionaryComprehension]], Iterator[None]]"; expected "Callable[[SemanticAnalyzer, Union[FuncItem, GeneratorExpr, DictionaryComprehension]], Generator[Never, None, None]]" [arg-type]
+ mypy/checkexpr.py:2840: error: Need type annotation for "m" [var-annotated]
+ mypy/checkexpr.py:3059: error: Argument 1 to "contextmanager" has incompatible type "Callable[[ExpressionChecker, Sequence[Expression], Sequence[Type]], Iterator[None]]"; expected "Callable[[ExpressionChecker, Sequence[Expression], Sequence[Type]], Generator[Never, None, None]]" [arg-type]
+ mypy/checkexpr.py:5200: error: Need type annotation for "tmap" [var-annotated]
+ mypy/checker.py:1135: error: Argument 1 to "contextmanager" has incompatible type "Callable[[TypeChecker], Iterator[None]]"; expected "Callable[[TypeChecker], Generator[Never, None, None]]" [arg-type]
+ mypy/checker.py:3465: error: Argument 1 to "contextmanager" has incompatible type "Callable[[TypeChecker, bool], Iterator[None]]"; expected "Callable[[TypeChecker, bool], Generator[Never, None, None]]" [arg-type]
+ mypy/checker.py:3804: error: Need type annotation for "assignments" [var-annotated]
+ mypy/checker.py:3804: note: See https://mypy.rtfd.io/en/stable/_refs.html#code-var-annotated for more info
+ mypy/checker.py:4282: error: Need type annotation for "type_map" [var-annotated]
+ mypy/checker.py:6895: error: Argument 1 to "contextmanager" has incompatible type "Callable[[TypeChecker], Iterator[None]]"; expected "Callable[[TypeChecker], Generator[Never, None, None]]" [arg-type]
+ mypy/checker.py:6984: error: Argument 1 to "contextmanager" has incompatible type "Callable[[TypeChecker], Iterator[Dict[Expression, Type]]]"; expected "Callable[[TypeChecker], Generator[Never, None, None]]" [arg-type]
+ mypy/checker.py:7052: error: Argument 1 to "contextmanager" has incompatible type "Callable[[TypeChecker, DefaultNamedArg(bool, 'is_function'), DefaultNamedArg(bool, 'is_class')], Iterator[None]]"; expected "Callable[[TypeChecker, DefaultNamedArg(bool, 'is_function'), DefaultNamedArg(bool, 'is_class')], Generator[Never, None, None]]" [arg-type]
+ mypy/checker.py:8197: error: Argument 1 to "contextmanager" has incompatible type "Callable[[CheckerScope, FuncItem], Iterator[None]]"; expected "Callable[[CheckerScope, FuncItem], Generator[Never, None, None]]" [arg-type]
+ mypy/checker.py:8203: error: Argument 1 to "contextmanager" has incompatible type "Callable[[CheckerScope, TypeInfo], Iterator[None]]"; expected "Callable[[CheckerScope, TypeInfo], Generator[Never, None, None]]" [arg-type]
+ mypy/stats.py:173: error: Argument 1 to "contextmanager" has incompatible type "Callable[[StatisticsVisitor, FuncDef], Iterator[None]]"; expected "Callable[[StatisticsVisitor, FuncDef], Generator[Never, None, None]]" [arg-type]
+ mypy/build.py:2055: error: Argument 1 to "contextmanager" has incompatible type "Callable[[State, bool], Iterator[None]]"; expected "Callable[[State, bool], Generator[Never, None, None]]" [arg-type]
+ mypyc/irbuild/builder.py:1157: error: Argument 1 to "contextmanager" has incompatible type "Callable[[IRBuilder, ClassIR, str, RType, Union[FuncInfo, str], Optional[RType]], Iterator[None]]"; expected "Callable[[IRBuilder, ClassIR, str, RType, Union[FuncInfo, str], Optional[RType]], Generator[Never, None, None]]" [arg-type]
+ mypy/test/teststubtest.py:19: error: Argument 1 to "contextmanager" has incompatible type "Callable[[str], Iterator[str]]"; expected "Callable[[str], Generator[Never, None, None]]" [arg-type]
+ mypy/test/teststubtest.py:150: error: Need type annotation for "tmp_dir" [var-annotated]
+ mypy/suggestions.py:289: error: Argument 1 to "contextmanager" has incompatible type "Callable[[SuggestionEngine, str], Iterator[None]]"; expected "Callable[[SuggestionEngine, str], Generator[Never, None, None]]" [arg-type]
+ mypy/suggestions.py:300: error: Argument 1 to "contextmanager" has incompatible type "Callable[[SuggestionEngine], Iterator[None]]"; expected "Callable[[SuggestionEngine], Generator[Never, None, None]]" [arg-type]
+ mypy/test/helpers.py:242: error: Argument 1 to "contextmanager" has incompatible type "Callable[[], Iterator[None]]"; expected "Callable[[], Generator[Never, None, None]]" [arg-type]
+ mypy/test/testpep561.py:30: error: Argument 1 to "contextmanager" has incompatible type "Callable[[str], Iterator[Tuple[str, str]]]"; expected "Callable[[str], Generator[Never, None, None]]" [arg-type]
+ mypy/test/testpep561.py:111: error: Need type annotation for "venv" [var-annotated]
+ mypyc/test/testutil.py:50: error: Argument 1 to "contextmanager" has incompatible type "Callable[[str, DataDrivenTestCase], Iterator[None]]"; expected "Callable[[str, DataDrivenTestCase], Generator[Never, None, None]]" [arg-type]
+ mypyc/test/test_run.py:125: error: Argument 1 to "contextmanager" has incompatible type "Callable[[str], Iterator[None]]"; expected "Callable[[str], Generator[Never, None, None]]" [arg-type]
pydantic (https://github.com/pydantic/pydantic)
+ pydantic/_internal/_generics.py:385: error: Argument 1 to "contextmanager" has incompatible type "Callable[[type[BaseModel], tuple[Any, ...]], Iterator[PydanticRecursiveRef | None]]"; expected "Callable[[type[BaseModel], tuple[Any, ...]], Generator[Never, None, None]]" [arg-type]
+ pydantic/_internal/_generate_schema.py:526: error: Never object is not iterable [misc]
+ pydantic/_internal/_generate_schema.py:527: error: Cannot determine type of "maybe_schema" [has-type]
+ pydantic/_internal/_generate_schema.py:528: error: Cannot determine type of "maybe_schema" [has-type]
+ pydantic/_internal/_generate_schema.py:586: error: Cannot determine type of "model_ref" [has-type]
+ pydantic/_internal/_generate_schema.py:612: error: Cannot determine type of "model_ref" [has-type]
+ pydantic/_internal/_generate_schema.py:618: error: Cannot determine type of "model_ref" [has-type]
+ pydantic/_internal/_generate_schema.py:619: error: Cannot determine type of "model_ref" [has-type]
+ pydantic/_internal/_generate_schema.py:664: error: Never object is not iterable [misc]
+ pydantic/_internal/_generate_schema.py:665: error: Cannot determine type of "maybe_schema" [has-type]
+ pydantic/_internal/_generate_schema.py:666: error: Cannot determine type of "maybe_schema" [has-type]
- pydantic/_internal/_generate_schema.py:1243: error: Unused "type: ignore" comment [unused-ignore]
+ pydantic/_internal/_generate_schema.py:1229: error: Never object is not iterable [misc]
+ pydantic/_internal/_generate_schema.py:1230: error: Cannot determine type of "maybe_schema" [has-type]
+ pydantic/_internal/_generate_schema.py:1231: error: Cannot determine type of "maybe_schema" [has-type]
+ pydantic/_internal/_generate_schema.py:1244: error: Cannot determine type of "ref" [has-type]
+ pydantic/_internal/_generate_schema.py:1245: error: Cannot determine type of "ref" [has-type]
+ pydantic/_internal/_generate_schema.py:1278: error: Never object is not iterable [misc]
+ pydantic/_internal/_generate_schema.py:1282: error: Cannot determine type of "maybe_schema" [has-type]
+ pydantic/_internal/_generate_schema.py:1283: error: Cannot determine type of "maybe_schema" [has-type]
+ pydantic/_internal/_generate_schema.py:1358: error: Cannot determine type of "typed_dict_ref" [has-type]
+ pydantic/_internal/_generate_schema.py:1365: error: Cannot determine type of "typed_dict_ref" [has-type]
+ pydantic/_internal/_generate_schema.py:1366: error: Cannot determine type of "typed_dict_ref" [has-type]
+ pydantic/_internal/_generate_schema.py:1370: error: Never object is not iterable [misc]
+ pydantic/_internal/_generate_schema.py:1374: error: Cannot determine type of "maybe_schema" [has-type]
+ pydantic/_internal/_generate_schema.py:1375: error: Cannot determine type of "maybe_schema" [has-type]
+ pydantic/_internal/_generate_schema.py:1402: error: Cannot determine type of "namedtuple_ref" [has-type]
+ pydantic/_internal/_generate_schema.py:1570: error: Never object is not iterable [misc]
+ pydantic/_internal/_generate_schema.py:1574: error: Cannot determine type of "maybe_schema" [has-type]
+ pydantic/_internal/_generate_schema.py:1575: error: Cannot determine type of "maybe_schema" [has-type]
+ pydantic/_internal/_generate_schema.py:1657: error: Cannot determine type of "dataclass_ref" [has-type]
+ pydantic/_internal/_generate_schema.py:1665: error: Cannot determine type of "dataclass_ref" [has-type]
+ pydantic/_internal/_generate_schema.py:1666: error: Cannot determine type of "dataclass_ref" [has-type]
+ pydantic/_internal/_generate_schema.py:2307: error: Argument 1 to "contextmanager" has incompatible type "Callable[[_Definitions, Any], Iterator[tuple[str, None] | tuple[str, Any]]]"; expected "Callable[[_Definitions, Any], Generator[Never, None, None]]" [arg-type]
+ pydantic/_internal/_generate_schema.py:2354: error: Argument 1 to "contextmanager" has incompatible type "Callable[[_FieldNameStack, str], Iterator[None]]"; expected "Callable[[_FieldNameStack, str], Generator[Never, None, None]]" [arg-type]
+ pydantic/_internal/_generate_schema.py:2373: error: Argument 1 to "contextmanager" has incompatible type "Callable[[_ModelTypeStack, type], Iterator[None]]"; expected "Callable[[_ModelTypeStack, type], Generator[Never, None, None]]" [arg-type]
+ pydantic/main.py:729: error: Need type annotation for "maybe_self_type" [var-annotated]
+ pydantic/type_adapter.py:266: error: Argument 1 to "contextmanager" has incompatible type "Callable[[TypeAdapter[T], int], Iterator[None]]"; expected "Callable[[TypeAdapter[T], int], Generator[Never, None, None]]" [arg-type]
pybind11 (https://github.com/pybind/pybind11)
+ pybind11/setup_helpers.py:212: error: Argument 1 to "contextmanager" has incompatible type "Callable[[], Iterator[str]]"; expected "Callable[[], Generator[Never, None, None]]" [arg-type]
packaging (https://github.com/pypa/packaging)
+ src/packaging/_tokenizer.py:173: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Tokenizer, str, str, NamedArg(str, 'around')], Iterator[None]]"; expected "Callable[[Tokenizer, str, str, NamedArg(str, 'around')], Generator[Never, None, None]]" [arg-type]
websockets (https://github.com/aaugustin/websockets)
+ src/websockets/sync/connection.py:623: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Connection, DefaultNamedArg(State, 'expected_state')], Iterator[None]]"; expected "Callable[[Connection, DefaultNamedArg(State, 'expected_state')], Generator[Never, None, None]]" [arg-type]
flake8-pyi (https://github.com/PyCQA/flake8-pyi)
+ pyi.py:1001: error: Argument 1 to "contextmanager" has incompatible type "Callable[[NestingCounter], Iterator[None]]"; expected "Callable[[NestingCounter], Generator[Never, None, None]]" [arg-type]
scrapy (https://github.com/scrapy/scrapy)
+ scrapy/utils/misc.py:231: error: Argument 1 to "contextmanager" has incompatible type "Callable[[KwArg(str)], Iterator[None]]"; expected "Callable[[KwArg(str)], Generator[Never, None, None]]" [arg-type]
+ tests/test_commands.py:676: error: Argument 1 to "contextmanager" has incompatible type "Callable[[RunSpiderCommandTest, Any, Any], Iterator[str]]"; expected "Callable[[RunSpiderCommandTest, Any, Any], Generator[Never, None, None]]" [arg-type]
comtypes (https://github.com/enthought/comtypes)
+ comtypes/test/test_findgendir.py:19: error: Argument 1 to "contextmanager" has incompatible type "Callable[[], Iterator[Module]]"; expected "Callable[[], Generator[Never, None, None]]" [arg-type]
+ comtypes/test/test_client_regenerate_modules.py:27: error: Argument 1 to "contextmanager" has incompatible type "Callable[[], Iterator[Path]]"; expected "Callable[[], Generator[Never, None, None]]" [arg-type]
+ comtypes/test/test_client_regenerate_modules.py:40: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Path], Iterator[Module]]"; expected "Callable[[Path], Generator[Never, None, None]]" [arg-type]
+ comtypes/test/test_client_regenerate_modules.py:83: error: Argument 1 to "contextmanager" has incompatible type "Callable[[], Iterator[Path]]"; expected "Callable[[], Generator[Never, None, None]]" [arg-type]
+ comtypes/test/test_client_regenerate_modules.py:85: error: Need type annotation for "tmp_gen_dir" [var-annotated]
mypy-protobuf (https://github.com/dropbox/mypy-protobuf)
+ mypy_protobuf/main.py:227: error: Argument 1 to "contextmanager" has incompatible type "Callable[[PkgWriter], Iterator[None]]"; expected "Callable[[PkgWriter], Generator[Never, None, None]]" [arg-type]
+ mypy_protobuf/main.py:1036: error: Argument 1 to "contextmanager" has incompatible type "Callable[[], Iterator[tuple[CodeGeneratorRequest, CodeGeneratorResponse]]]"; expected "Callable[[], Generator[Never, None, None]]" [arg-type]
+ mypy_protobuf/main.py:1066: error: Never object is not iterable [misc]
+ mypy_protobuf/main.py:1068: error: Cannot determine type of "request" [has-type]
+ mypy_protobuf/main.py:1069: error: Cannot determine type of "response" [has-type]
+ mypy_protobuf/main.py:1070: error: Cannot determine type of "request" [has-type]
+ mypy_protobuf/main.py:1071: error: Cannot determine type of "request" [has-type]
+ mypy_protobuf/main.py:1072: error: Cannot determine type of "request" [has-type]
+ mypy_protobuf/main.py:1078: error: Never object is not iterable [misc]
+ mypy_protobuf/main.py:1080: error: Cannot determine type of "request" [has-type]
+ mypy_protobuf/main.py:1081: error: Cannot determine type of "response" [has-type]
+ mypy_protobuf/main.py:1082: error: Cannot determine type of "request" [has-type]
+ mypy_protobuf/main.py:1083: error: Cannot determine type of "request" [has-type]
+ mypy_protobuf/main.py:1084: error: Cannot determine type of "request" [has-type]
pwndbg (https://github.com/pwndbg/pwndbg)
+ pwndbg/gdblib/scheduler.py:9: error: Argument 1 to "contextmanager" has incompatible type "Callable[[], Iterator[None]]"; expected "Callable[[], Generator[Never, None, None]]" [arg-type]
+ pwndbg/wrappers/checksec.py:12: error: Argument 1 to "contextmanager" has incompatible type "Callable[[], Iterator[None]]"; expected "Callable[[], Generator[Never, None, None]]" [arg-type]
mongo-python-driver (https://github.com/mongodb/mongo-python-driver)
+ pymongo/synchronous/encryption.py:105: error: Argument 1 to "contextmanager" has incompatible type "Callable[[], Iterator[None]]"; expected "Callable[[], Generator[Never, None, None]]" [arg-type]
+ pymongo/asynchronous/encryption.py:105: error: Argument 1 to "contextmanager" has incompatible type "Callable[[], Iterator[None]]"; expected "Callable[[], Generator[Never, None, None]]" [arg-type]
poetry (https://github.com/python-poetry/poetry)
+ src/poetry/config/file_config_source.py:34: error: Need type annotation for "toml" [var-annotated]
+ src/poetry/config/file_config_source.py:49: error: Need type annotation for "toml" [var-annotated]
+ src/poetry/config/file_config_source.py:65: error: Argument 1 to "contextmanager" has incompatible type "Callable[[FileConfigSource], Iterator[Any]]"; expected "Callable[[FileConfigSource], Generator[Never, None, None]]" [arg-type]
+ src/poetry/inspection/lazy_wheel.py:456: error: Argument 1 to "contextmanager" has incompatible type "Callable[[LazyFileOverHTTP], Iterator[None]]"; expected "Callable[[LazyFileOverHTTP], Generator[Never, None, None]]" [arg-type]
+ src/poetry/utils/helpers.py:64: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Path], Iterator[Path]]"; expected "Callable[[Path], Generator[Never, None, None]]" [arg-type]
+ src/poetry/utils/helpers.py:145: error: Need type annotation for "update_context" [var-annotated]
+ src/poetry/utils/env/virtual_env.py:121: error: Argument 1 to "contextmanager" has incompatible type "Callable[[VirtualEnv], Iterator[None]]"; expected "Callable[[VirtualEnv], Generator[Never, None, None]]" [arg-type]
+ src/poetry/utils/env/__init__.py:40: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Path | None, dict[str, str | bool] | None], Iterator[VirtualEnv]]"; expected "Callable[[Path | None, dict[str, str | bool] | None], Generator[Never, None, None]]" [arg-type]
+ src/poetry/utils/env/__init__.py:56: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Poetry, Env | None, Any | None], Iterator[Env]]"; expected "Callable[[Poetry, Env | None, Any | None], Generator[Never, None, None]]" [arg-type]
+ src/poetry/utils/env/__init__.py:68: error: Need type annotation for "venv" [var-annotated]
+ src/poetry/utils/isolated_build.py:108: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Path, Any, Path | None, RepositoryPool | None], Iterator[Any]]"; expected "Callable[[Path, Any, Path | None, RepositoryPool | None], Generator[Never, None, None]]" [arg-type]
+ src/poetry/utils/isolated_build.py:137: error: Need type annotation for "venv" [var-annotated]
+ src/poetry/masonry/builders/editable.py:84: error: Need type annotation for "env" [var-annotated]
+ src/poetry/installation/chef.py:57: error: Need type annotation for "builder" [var-annotated]
+ src/poetry/inspection/info.py:539: error: Need type annotation for "builder" [var-annotated]
+ src/poetry/repositories/http_repository.py:101: error: Argument 1 to "contextmanager" has incompatible type "Callable[[HTTPRepository, Any, DefaultNamedArg(bool, 'raise_accepts_ranges')], Iterator[Path]]"; expected "Callable[[HTTPRepository, Any, DefaultNamedArg(bool, 'raise_accepts_ranges')], Generator[Never, None, None]]" [arg-type]
+ src/poetry/repositories/http_repository.py:140: error: Need type annotation for "filepath" [var-annotated]
+ src/poetry/repositories/http_repository.py:159: error: Need type annotation for "filepath" [var-annotated]
+ src/poetry/repositories/http_repository.py:372: error: Need type annotation for "filepath" [var-annotated]
+ src/poetry/puzzle/provider.py:86: error: Argument 1 to "contextmanager" has incompatible type "Callable[[], Iterator[Callable[[str | None], None]]]"; expected "Callable[[], Generator[Never, None, None]]" [arg-type]
+ src/poetry/puzzle/provider.py:165: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Provider, Path], Iterator[Provider]]"; expected "Callable[[Provider, Path], Generator[Never, None, None]]" [arg-type]
+ src/poetry/puzzle/provider.py:175: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Provider, Env], Iterator[Provider]]"; expected "Callable[[Provider, Env], Generator[Never, None, None]]" [arg-type]
+ src/poetry/puzzle/provider.py:188: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Provider, Collection[Any]], Iterator[Provider]]"; expected "Callable[[Provider, Collection[Any]], Generator[Never, None, None]]" [arg-type]
+ src/poetry/puzzle/solver.py:60: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Solver, Env], Iterator[None]]"; expected "Callable[[Solver, Env], Generator[Never, None, None]]" [arg-type]
+ src/poetry/puzzle/solver.py:104: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Solver], Iterator[None]]"; expected "Callable[[Solver], Generator[Never, None, None]]" [arg-type]
+ src/poetry/console/commands/build.py:79: error: Need type annotation for "env" [var-annotated]
+ tests/helpers.py:231: error: Argument 1 to "contextmanager" has incompatible type "Callable[[dict[str, Any] | None, bool], Iterator[None]]"; expected "Callable[[dict[str, Any] | None, bool], Generator[Never, None, None]]" [arg-type]
+ tests/helpers.py:331: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Path, bool], Iterator[Path]]"; expected "Callable[[Path, bool], Generator[Never, None, None]]" [arg-type]
+ tests/helpers.py:345: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Path, Path | None], Iterator[Path]]"; expected "Callable[[Path, Path | None], Generator[Never, None, None]]" [arg-type]
+ tests/helpers.py:353: error: Need type annotation for "path" [var-annotated]
+ tests/utils/env/test_env.py:483: error: Need type annotation for "project_env" [var-annotated]
+ tests/utils/env/test_env.py:505: error: Need type annotation for "env" [var-annotated]
+ tests/utils/env/test_env.py:507: error: Unused "type: ignore" comment [unused-ignore]
+ tests/repositories/test_legacy_repository.py:535: error: Need type annotation for "filepath" [var-annotated]
+ tests/masonry/builders/test_editable_builder.py:263: error: Need type annotation for "venv" [var-annotated]
+ tests/conftest.py:542: error: Argument 1 to "contextmanager" has incompatible type "Callable[[str | Path, bool], Iterator[Path]]"; expected "Callable[[str | Path, bool], Generator[Never, None, None]]" [arg-type]
+ tests/conftest.py:547: error: Need type annotation for "path" [var-annotated]
+ tests/utils/test_isolated_build.py:47: error: Need type annotation for "venv" [var-annotated]
+ tests/utils/test_isolated_build.py:69: error: Need type annotation for "venv" [var-annotated]
+ tests/utils/test_isolated_build.py:79: error: Need type annotation for "venv" [var-annotated]
+ tests/utils/test_isolated_build.py:94: error: Need type annotation for "builder" [var-annotated]
+ tests/repositories/test_installed_repository.py:37: error: Need type annotation for "path" [var-annotated]
+ tests/repositories/fixtures/pypi.org/generate.py:313: error: Need type annotation for "src" [var-annotated]
+ tests/repositories/fixtures/pypi.org/generate.py:328: error: Need type annotation for "src" [var-annotated]
+ tests/repositories/fixtures/pypi.org/generate.py:353: error: Need type annotation for "src" [var-annotated]
cki-lib (https://gitlab.com/cki-project/cki-lib)
+ cki_lib/logger.py:25: error: Argument 1 to "contextmanager" has incompatible type "Callable[[dict[str, Any]], Iterator[None]]"; expected "Callable[[dict[str, Any]], Generator[Never, None, None]]" [arg-type]
+ tests/test_yaml.py:154: error: Argument 1 to "contextmanager" has incompatible type "Callable[[str],
... (truncated 416 lines) ...
Maybe we could split the third-party changes out. I think they are worthwhile, whether we change contextmanager or not. (Although looking at the primer output, "not" seems like the better choice, at the moment.)
Another idea to play around with: Use an overload with deprecated:
@overload
def contextmanager(func: Callable[_P, Generator[_T_co]]) -> Callable[_P, _GeneratorContextManager[_T_co]]: ...
@deprecated("...")
@overload
def contextmanager(func: Callable[_P, Iterator[_T_co]]) -> Callable[_P, _GeneratorContextManager[_T_co]]: ...
Also, @graingert's comment from the original thread seems worthwhile, although I doubt it will help with the primer hits.
Another idea to play around with: Use an overload with deprecated:
Yeah, let me split out third-party changes into its own PR.
Diff from mypy_primer, showing the effect of this PR on open source code:
pytest-robotframework (https://github.com/detachhead/pytest-robotframework)
+ pytest_robotframework/_internal/pytest/robot_file_support.py:108: error: Argument 1 to "contextmanager" has incompatible type "Callable[[], Iterator[None]]"; expected "Callable[[], Generator[Never, None, None]]" [arg-type]
+ pytest_robotframework/__init__.py:532: error: Argument 1 to "contextmanager" has incompatible type "Callable[[VarArg(str), KwArg(str)], Iterator[None]]"; expected "Callable[[VarArg(str), KwArg(str)], Generator[Never, None, None]]" [arg-type]
+ pytest_robotframework/__init__.py:711: error: Argument 1 to "contextmanager" has incompatible type "Callable[[], Iterator[None]]"; expected "Callable[[], Generator[Never, None, None]]" [arg-type]
vision (https://github.com/pytorch/vision)
+ torchvision/datasets/imagenet.py:134: error: Argument 1 to "contextmanager" has incompatible type "Callable[[], Iterator[str]]"; expected "Callable[[], Generator[Never, None, None]]" [arg-type]
+ torchvision/datasets/imagenet.py:149: error: Need type annotation for "tmp_dir" [var-annotated]
porcupine (https://github.com/Akuli/porcupine)
+ porcupine/textutils.py:471: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Text], Iterator[None]]"; expected "Callable[[Text], Generator[Never, None, None]]" [arg-type]
mitmproxy (https://github.com/mitmproxy/mitmproxy)
+ mitmproxy/utils/asyncio_utils.py:66: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Any], Iterator[None]]"; expected "Callable[[Any], Generator[Never, None, None]]" [arg-type]
+ mitmproxy/utils/asyncio_utils.py:77: error: Argument 1 to "contextmanager" has incompatible type "Callable[[], Iterator[None]]"; expected "Callable[[], Generator[Never, None, None]]" [arg-type]
xarray (https://github.com/pydata/xarray)
+ xarray/tests/test_backends.py: note: In member "test_dtype_coercion_error" of class "NetCDF3Only":
+ xarray/tests/test_backends.py:294: error: Need type annotation for "path" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "roundtrip" of class "DatasetIOBase":
+ xarray/tests/test_backends.py:314: error: Need type annotation for "path" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "roundtrip_append" of class "DatasetIOBase":
+ xarray/tests/test_backends.py:327: error: Need type annotation for "path" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_grid_mapping_and_bounds_are_not_coordinates_in_file" of class "CFEncodedBase":
+ xarray/tests/test_backends.py:1013: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_coordinates_encoding" of class "CFEncodedBase":
+ xarray/tests/test_backends.py:1081: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_append_overwrite_values" of class "CFEncodedBase":
+ xarray/tests/test_backends.py:1257: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_append_with_invalid_dim_raises" of class "CFEncodedBase":
+ xarray/tests/test_backends.py:1267: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_refresh_from_disk" of class "NetCDFBase":
+ xarray/tests/test_backends.py:1299: error: Need type annotation for "example_1_path" [var-annotated]
+ xarray/tests/test_backends.py:1300: error: Need type annotation for "example_1_modified_path" [var-annotated]
+ xarray/tests/test_backends.py: note: At top level:
+ xarray/tests/test_backends.py:1325: error: Argument 1 to "contextmanager" has incompatible type "Callable[[str, bool], Iterator[str]]"; expected "Callable[[str, bool], Generator[Never, None, None]]" [arg-type]
+ xarray/tests/test_backends.py:1341: error: Argument 1 to "contextmanager" has incompatible type "Callable[[int, str, bool], Iterator[list[str]]]"; expected "Callable[[int, str, bool], Generator[Never, None, None]]" [arg-type]
+ xarray/tests/test_backends.py: note: In function "create_tmp_files":
+ xarray/tests/test_backends.py:1346: error: Need type annotation for "files" (hint: "files: list[<type>] = ...") [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_open_group" of class "NetCDF4Base":
+ xarray/tests/test_backends.py:1360: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_open_subgroup" of class "NetCDF4Base":
+ xarray/tests/test_backends.py:1386: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_write_groups" of class "NetCDF4Base":
+ xarray/tests/test_backends.py:1408: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_roundtrip_character_array" of class "NetCDF4Base":
+ xarray/tests/test_backends.py:1451: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_open_encodings" of class "NetCDF4Base":
+ xarray/tests/test_backends.py:1478: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_dump_and_open_encodings" of class "NetCDF4Base":
+ xarray/tests/test_backends.py:1512: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py:1521: error: Need type annotation for "tmp_file2" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_mask_and_scale" of class "NetCDF4Base":
+ xarray/tests/test_backends.py:1674: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_0dimensional_variable" of class "NetCDF4Base":
+ xarray/tests/test_backends.py:1702: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_read_variable_len_strings" of class "NetCDF4Base":
+ xarray/tests/test_backends.py:1712: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_encoding_enum__no_fill_value" of class "NetCDF4Base":
+ xarray/tests/test_backends.py:1751: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_encoding_enum__multiple_variable_with_enum" of class "NetCDF4Base":
+ xarray/tests/test_backends.py:1782: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_encoding_enum__error_multiple_variable_with_changing_enum" of class "NetCDF4Base":
+ xarray/tests/test_backends.py:1829: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "create_store" of class "TestNetCDF4Data":
+ xarray/tests/test_backends.py:1874: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_base_case" of class "TestNetCDF4AlreadyOpen":
+ xarray/tests/test_backends.py:2005: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_group" of class "TestNetCDF4AlreadyOpen":
+ xarray/tests/test_backends.py:2017: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_deepcopy" of class "TestNetCDF4AlreadyOpen":
+ xarray/tests/test_backends.py:2041: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "create_zarr_target" of class "TestZarrDirectoryStore":
+ xarray/tests/test_backends.py:3201: error: Need type annotation for "tmp" [var-annotated]
+ xarray/tests/test_backends.py: note: In class "TestZarrWriteEmpty":
+ xarray/tests/test_backends.py:3217: error: Argument 1 to "contextmanager" has incompatible type "Callable[[TestZarrWriteEmpty], Iterator[tuple[str, str]]]"; expected "Callable[[TestZarrWriteEmpty], Generator[Never, None, None]]" [arg-type]
+ xarray/tests/test_backends.py:3223: error: Argument 1 to "contextmanager" has incompatible type "Callable[[TestZarrWriteEmpty, Any, Any, Any, Any, Any], Iterator[Dataset]]"; expected "Callable[[TestZarrWriteEmpty, Any, Any, Any, Any, Any], Generator[Never, None, None]]" [arg-type]
+ xarray/tests/test_backends.py: note: In member "test_write_empty" of class "TestZarrWriteEmpty":
+ xarray/tests/test_backends.py:3277: error: "Never" object is not iterable [misc]
+ xarray/tests/test_backends.py:3279: error: Cannot determine type of "store" [has-type]
+ xarray/tests/test_backends.py:3285: error: Need type annotation for "a_ds" [var-annotated]
+ xarray/tests/test_backends.py:3287: error: Cannot determine type of "store" [has-type]
+ xarray/tests/test_backends.py:3294: error: Cannot determine type of "store" [has-type]
+ xarray/tests/test_backends.py: note: In member "create_zarr_target" of class "TestZarrDirectoryStoreV3":
+ xarray/tests/test_backends.py:3358: error: Need type annotation for "tmp" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "create_zarr_target" of class "TestZarrDirectoryStoreV3FromPath":
+ xarray/tests/test_backends.py:3370: error: Need type annotation for "tmp" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "roundtrip" of class "TestScipyFileObject":
+ xarray/tests/test_backends.py:3423: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "create_store" of class "TestScipyFilePath":
+ xarray/tests/test_backends.py:3445: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_nc4_scipy" of class "TestScipyFilePath":
+ xarray/tests/test_backends.py:3468: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "create_store" of class "TestNetCDF3ViaNetCDF4Data":
+ xarray/tests/test_backends.py:3483: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "create_store" of class "TestNetCDF4ClassicViaNetCDF4Data":
+ xarray/tests/test_backends.py:3504: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_engine" of class "TestGenericNetCDFData":
+ xarray/tests/test_backends.py:3529: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_cross_engine_read_write_netcdf3" of class "TestGenericNetCDFData":
+ xarray/tests/test_backends.py:3548: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "create_store" of class "TestH5NetCDFData":
+ xarray/tests/test_backends.py:3592: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_cross_engine_read_write_netcdf4" of class "TestH5NetCDFData":
+ xarray/tests/test_backends.py:3631: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_read_byte_attrs_as_unicode" of class "TestH5NetCDFData":
+ xarray/tests/test_backends.py:3638: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_compression_check_encoding_h5py" of class "TestH5NetCDFData":
+ xarray/tests/test_backends.py:3704: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py:3722: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py:3732: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_decode_utf8_warning" of class "TestH5NetCDFData":
+ xarray/tests/test_backends.py:3765: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_open_dataset_group" of class "TestH5NetCDFAlreadyOpen":
+ xarray/tests/test_backends.py:3780: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_deepcopy" of class "TestH5NetCDFAlreadyOpen":
+ xarray/tests/test_backends.py:3803: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_open_twice" of class "TestH5NetCDFFileObject":
+ xarray/tests/test_backends.py:3844: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_open_fileobj" of class "TestH5NetCDFFileObject":
+ xarray/tests/test_backends.py:3856: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In function "test_open_mfdataset_manyfiles":
+ xarray/tests/test_backends.py:4021: error: Need type annotation for "tmpfiles" [var-annotated]
+ xarray/tests/test_backends.py: note: In function "test_open_mfdataset_list_attr":
+ xarray/tests/test_backends.py:4061: error: Need type annotation for "nfiles" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "setup_files_and_datasets" of class "TestOpenMFDatasetWithDataVarsAndCoordsKw":
+ xarray/tests/test_backends.py:4092: error: Need type annotation for "tmpfile1" [var-annotated]
+ xarray/tests/test_backends.py:4093: error: Need type annotation for "tmpfile2" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_open_mfdataset" of class "TestDask":
+ xarray/tests/test_backends.py:4354: error: Need type annotation for "tmp1" [var-annotated]
+ xarray/tests/test_backends.py:4355: error: Need type annotation for "tmp2" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_open_mfdataset_2d" of class "TestDask":
+ xarray/tests/test_backends.py:4384: error: Need type annotation for "tmp1" [var-annotated]
+ xarray/tests/test_backends.py:4385: error: Need type annotation for "tmp2" [var-annotated]
+ xarray/tests/test_backends.py:4386: error: Need type annotation for "tmp3" [var-annotated]
+ xarray/tests/test_backends.py:4387: error: Need type annotation for "tmp4" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_open_mfdataset_pathlib" of class "TestDask":
+ xarray/tests/test_backends.py:4413: error: Need type annotation for "tmps1" [var-annotated]
+ xarray/tests/test_backends.py:4414: error: Need type annotation for "tmps2" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_open_mfdataset_2d_pathlib" of class "TestDask":
+ xarray/tests/test_backends.py:4426: error: Need type annotation for "tmps1" [var-annotated]
+ xarray/tests/test_backends.py:4427: error: Need type annotation for "tmps2" [var-annotated]
+ xarray/tests/test_backends.py:4428: error: Need type annotation for "tmps3" [var-annotated]
+ xarray/tests/test_backends.py:4429: error: Need type annotation for "tmps4" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_open_mfdataset_2" of class "TestDask":
+ xarray/tests/test_backends.py:4447: error: Need type annotation for "tmp1" [var-annotated]
+ xarray/tests/test_backends.py:4448: error: Need type annotation for "tmp2" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_attrs_mfdataset" of class "TestDask":
+ xarray/tests/test_backends.py:4459: error: Need type annotation for "tmp1" [var-annotated]
+ xarray/tests/test_backends.py:4460: error: Need type annotation for "tmp2" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_open_mfdataset_attrs_file" of class "TestDask":
+ xarray/tests/test_backends.py:4479: error: "Never" object is not iterable [misc]
+ xarray/tests/test_backends.py:4484: error: Cannot determine type of "tmp1" [has-type]
+ xarray/tests/test_backends.py:4485: error: Cannot determine type of "tmp2" [has-type]
+ xarray/tests/test_backends.py:4487: error: Cannot determine type of "tmp1" [has-type]
+ xarray/tests/test_backends.py:4487: error: Cannot determine type of "tmp2" [has-type]
+ xarray/tests/test_backends.py: note: In member "test_open_mfdataset_attrs_file_path" of class "TestDask":
+ xarray/tests/test_backends.py:4496: error: "Never" object is not iterable [misc]
+ xarray/tests/test_backends.py:4497: error: Cannot determine type of "tmps1" [has-type]
+ xarray/tests/test_backends.py:4498: error: Cannot determine type of "tmps2" [has-type]
+ xarray/tests/test_backends.py: note: In member "test_open_mfdataset_auto_combine" of class "TestDask":
+ xarray/tests/test_backends.py:4515: error: Need type annotation for "tmp1" [var-annotated]
+ xarray/tests/test_backends.py:4516: error: Need type annotation for "tmp2" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_open_mfdataset_raise_on_bad_combine_args" of class "TestDask":
+ xarray/tests/test_backends.py:4526: error: Need type annotation for "tmp1" [var-annotated]
+ xarray/tests/test_backends.py:4527: error: Need type annotation for "tmp2" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_encoding_mfdataset" of class "TestDask":
+ xarray/tests/test_backends.py:4542: error: Need type annotation for "tmp1" [var-annotated]
+ xarray/tests/test_backends.py:4543: error: Need type annotation for "tmp2" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_preprocess_mfdataset" of class "TestDask":
+ xarray/tests/test_backends.py:4557: error: Need type annotation for "tmp" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_save_mfdataset_roundtrip" of class "TestDask":
+ xarray/tests/test_backends.py:4572: error: Need type annotation for "tmp1" [var-annotated]
+ xarray/tests/test_backends.py:4573: error: Need type annotation for "tmp2" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_save_mfdataset_pathlib_roundtrip" of class "TestDask":
+ xarray/tests/test_backends.py:4596: error: Need type annotation for "tmps1" [var-annotated]
+ xarray/tests/test_backends.py:4597: error: Need type annotation for "tmps2" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_open_and_do_math" of class "TestDask":
+ xarray/tests/test_backends.py:4631: error: Need type annotation for "tmp" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_open_mfdataset_concat_dim_none" of class "TestDask":
+ xarray/tests/test_backends.py:4638: error: Need type annotation for "tmp1" [var-annotated]
+ xarray/tests/test_backends.py:4639: error: Need type annotation for "tmp2" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_open_mfdataset_concat_dim_default_none" of class "TestDask":
+ xarray/tests/test_backends.py:4649: error: Need type annotation for "tmp1" [var-annotated]
+ xarray/tests/test_backends.py:4650: error: Need type annotation for "tmp2" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_open_dataset" of class "TestDask":
+ xarray/tests/test_backends.py:4659: error: Need type annotation for "tmp" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_open_single_dataset" of class "TestDask":
+ xarray/tests/test_backends.py:4680: error: Need type annotation for "tmp" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_open_multi_dataset" of class "TestDask":
+ xarray/tests/test_backends.py:4702: error: Need type annotation for "tmp1" [var-annotated]
+ xarray/tests/test_backends.py:4702: error: Need type annotation for "tmp2" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_dask_roundtrip" of class "TestDask":
+ xarray/tests/test_backends.py:4713: error: Need type annotation for "tmp" [var-annotated]
+ xarray/tests/test_backends.py:4719: error: Need type annotation for "tmp2" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_deterministic_names" of class "TestDask":
+ xarray/tests/test_backends.py:4725: error: Need type annotation for "tmp" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_save_mfdataset_compute_false_roundtrip" of class "TestDask":
+ xarray/tests/test_backends.py:4752: error: Need type annotation for "tmp1" [var-annotated]
+ xarray/tests/test_backends.py:4753: error: Need type annotation for "tmp2" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_load_dataset" of class "TestDask":
+ xarray/tests/test_backends.py:4765: error: Need type annotation for "tmp" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_load_dataarray" of class "TestDask":
+ xarray/tests/test_backends.py:4773: error: Need type annotation for "tmp" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_inline_array" of class "TestDask":
+ xarray/tests/test_backends.py:4786: error: Need type annotation for "tmp" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_compatible_to_netcdf" of class "TestPydap":
+ xarray/tests/test_backends.py:4876: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_validating_attrs" of class "TestValidateAttrs":
+ xarray/tests/test_backends.py:4995: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_dataarray_to_netcdf_no_name" of class "TestDataArrayToNetCDF":
+ xarray/tests/test_backends.py:5049: error: Need type annotation for "tmp" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_dataarray_to_netcdf_with_name" of class "TestDataArrayToNetCDF":
+ xarray/tests/test_backends.py:5058: error: Need type annotation for "tmp" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_dataarray_to_netcdf_coord_name_clash" of class "TestDataArrayToNetCDF":
+ xarray/tests/test_backends.py:5069: error: Need type annotation for "tmp" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_open_dataarray_options" of class "TestDataArrayToNetCDF":
+ xarray/tests/test_backends.py:5078: error: Need type annotation for "tmp" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_dataarray_to_netcdf_no_name_pathlib" of class "TestDataArrayToNetCDF":
+ xarray/tests/test_backends.py:5095: error: Need type annotation for "tmps" [var-annotated]
+ xarray/tests/test_backends.py: note: In function "test_no_warning_from_dask_effective_get":
+ xarray/tests/test_backends.py:5155: error: Need type annotation for "tmpfile" [var-annotated]
+ xarray/tests/test_backends.py: note: In function "test_source_encoding_always_present":
+ xarray/tests/test_backends.py:5166: error: Need type annotation for "tmp" [var-annotated]
+ xarray/tests/test_backends.py: note: In function "test_source_encoding_always_present_with_pathlib":
+ xarray/tests/test_backends.py:5177: error: Need type annotation for "tmp" [var-annotated]
+ xarray/tests/test_backends.py: note: In function "test_source_encoding_always_present_with_fsspec":
+ xarray/tests/test_backends.py:5190: error: Need type annotation for "tmp" [var-annotated]
+ xarray/tests/test_backends.py: note: In function "test_use_cftime_standard_calendar_default_in_range":
+ xarray/tests/test_backends.py:5223: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In function "test_use_cftime_standard_calendar_default_out_of_range":
+ xarray/tests/test_backends.py:5256: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In function "test_use_cftime_true":
+ xarray/tests/test_backends.py:5286: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In function "test_use_cftime_false_standard_calendar_in_range":
+ xarray/tests/test_backends.py:5317: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In function "test_use_cftime_false_standard_calendar_out_of_range":
+ xarray/tests/test_backends.py:5338: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In function "test_use_cftime_false_nonstandard_calendar":
+ xarray/tests/test_backends.py:5356: error: Need type annotation for "tmp_file" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_open_nczarr" of class "TestNCZarr":
+ xarray/tests/test_backends.py:5675: error: Need type annotation for "tmp" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_overwriting_nczarr" of class "TestNCZarr":
+ xarray/tests/test_backends.py:5681: error: Need type annotation for "tmp" [var-annotated]
+ xarray/tests/test_backends.py: note: In member "test_raise_writing_to_nczarr" of class "TestNCZarr":
+ xarray/tests/test_backends.py:5694: error: Need type annotation for "tmp" [var-annotated]
+ xarray/tests/test_distributed.py: note: In function "test_dask_distributed_zarr_integration_test":
+ xarray/tests/test_distributed.py:232: error: Need type annotation for "filename" [var-annotated]
schema_salad (https://github.com/common-workflow-language/schema_salad)
+ schema_salad/tests/test_cli_args.py:11:2: error: Argument 1 to "contextmanager" has incompatible type "Callable[[], Iterator[tuple[StringIO, StringIO]]]"; expected "Callable[[], Generator[Never, None, None]]" [arg-type]
+ schema_salad/tests/test_cli_args.py: note: In function "test_version":
+ schema_salad/tests/test_cli_args.py:25:14: error: "Never" object is not iterable [misc]
+ schema_salad/tests/test_cli_args.py:28:20: error: Cannot determine type of "out" [has-type]
+ schema_salad/tests/test_cli_args.py: note: In function "test_empty_input":
+ schema_salad/tests/test_cli_args.py:35:10: error: "Never" object is not iterable [misc]
+ schema_salad/tests/test_cli_args.py:38:16: error: Cannot determine type of "out" [has-type]
mypy (https://github.com/python/mypy)
+ mypyc/crash.py:9: error: Argument 1 to "contextmanager" has incompatible type "Callable[[str, int], Iterator[None]]"; expected "Callable[[str, int], Generator[Never, None, None]]" [arg-type]
+ mypy/state.py:17: error: Argument 1 to "contextmanager" has incompatible type "Callable[[StrictOptionalState, bool], Iterator[None]]"; expected "Callable[[StrictOptionalState, bool], Generator[Never, None, None]]" [arg-type]
+ mypy/scope.py:57: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Scope, str], Iterator[None]]"; expected "Callable[[Scope, str], Generator[Never, None, None]]" [arg-type]
+ mypy/scope.py:67: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Scope, FuncBase], Iterator[None]]"; expected "Callable[[Scope, FuncBase], Generator[Never, None, None]]" [arg-type]
+ mypy/scope.py:105: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Scope, TypeInfo], Iterator[None]]"; expected "Callable[[Scope, TypeInfo], Generator[Never, None, None]]" [arg-type]
+ mypy/scope.py:119: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Scope, Tuple[str, Optional[TypeInfo], Optional[FuncBase]]], Iterator[None]]"; expected "Callable[[Scope, Tuple[str, Optional[TypeInfo], Optional[FuncBase]]], Generator[Never, None, None]]" [arg-type]
+ mypy/server/aststrip.py:263: error: Argument 1 to "contextmanager" has incompatible type "Callable[[NodeStripVisitor, TypeInfo], Iterator[None]]"; expected "Callable[[NodeStripVisitor, TypeInfo], Generator[Never, None, None]]" [arg-type]
+ mypy/server/aststrip.py:273: error: Argument 1 to "contextmanager" has incompatible type "Callable[[NodeStripVisitor, TypeInfo], Iterator[None]]"; expected "Callable[[NodeStripVisitor, TypeInfo], Generator[Never, None, None]]" [arg-type]
+ mypy/renaming.py:295: error: Argument 1 to "contextmanager" has incompatible type "Callable[[VariableRenameVisitor], Iterator[None]]"; expected "Callable[[VariableRenameVisitor], Generator[Never, None, None]]" [arg-type]
+ mypy/renaming.py:305: error: Argument 1 to "contextmanager" has incompatible type "Callable[[VariableRenameVisitor], Iterator[None]]"; expected "Callable[[VariableRenameVisitor], Generator[Never, None, None]]" [arg-type]
+ mypy/renaming.py:313: error: Argument 1 to "contextmanager" has incompatible type "Callable[[VariableRenameVisitor], Iterator[None]]"; expected "Callable[[VariableRenameVisitor], Generator[Never, None, None]]" [arg-type]
+ mypy/renaming.py:324: error: Argument 1 to "contextmanager" has incompatible type "Callable[[VariableRenameVisitor, int], Iterator[None]]"; expected "Callable[[VariableRenameVisitor, int], Generator[Never, None, None]]" [arg-type]
+ mypy/renaming.py:537: error: Argument 1 to "contextmanager" has incompatible type "Callable[[LimitedVariableRenameVisitor], Iterator[None]]"; expected "Callable[[LimitedVariableRenameVisitor], Generator[Never, None, None]]" [arg-type]
+ mypy/stubutil.py:123: error: Argument 1 to "contextmanager" has incompatible type "Callable[[str, str, bool, bool], Iterator[None]]"; expected "Callable[[str, str, bool, bool], Generator[Never, None, None]]" [arg-type]
+ mypy/subtypes.py:183: error: Argument 1 to "pop_on_exit" has incompatible type "List[Tuple[Type, Type]]"; expected "List[Tuple[Never, Never]]" [arg-type]
+ mypy/subtypes.py:183: error: Argument 2 to "pop_on_exit" has incompatible type "Type"; expected "Never" [arg-type]
+ mypy/subtypes.py:183: error: Argument 3 to "pop_on_exit" has incompatible type "Type"; expected "Never" [arg-type]
+ mypy/subtypes.py:220: error: Argument 1 to "pop_on_exit" has incompatible type "List[Tuple[Type, Type]]"; expected "List[Tuple[Never, Never]]" [arg-type]
+ mypy/subtypes.py:220: error: Argument 2 to "pop_on_exit" has incompatible type "Type"; expected "Never" [arg-type]
+ mypy/subtypes.py:220: error: Argument 3 to "pop_on_exit" has incompatible type "Type"; expected "Never" [arg-type]
+ mypy/subtypes.py:1101: error: Argument 1 to "contextmanager" has incompatible type "Callable[[List[Tuple[T, T]], T, T], Iterator[None]]"; expected "Callable[[List[Tuple[Never, Never]], Never, Never], Generator[Never, None, None]]" [arg-type]
+ mypy/subtypes.py:1151: error: Argument 1 to "pop_on_exit" has incompatible type "List[Tuple[Instance, Instance]]"; expected "List[Tuple[Never, Never]]" [arg-type]
+ mypy/subtypes.py:1151: error: Argument 2 to "pop_on_exit" has incompatible type "Instance"; expected "Never" [arg-type]
+ mypy/subtypes.py:1151: error: Argument 3 to "pop_on_exit" has incompatible type "Instance"; expected "Never" [arg-type]
+ mypy/messages.py:198: error: Argument 1 to "contextmanager" has incompatible type "Callable[[MessageBuilder], Iterator[None]]"; expected "Callable[[MessageBuilder], Generator[Never, None, None]]" [arg-type]
+ mypy/binder.py:266: error: Argument 1 to "contextmanager" has incompatible type "Callable[[ConditionalTypeBinder], Iterator[defaultdict[Expression, List[Tuple[Type, Optional[Type]]]]]]"; expected "Callable[[ConditionalTypeBinder], Generator[Never, None, None]]" [arg-type]
+ mypy/binder.py:401: error: Argument 1 to "contextmanager" has incompatible type "Callable[[ConditionalTypeBinder, NamedArg(bool, 'can_skip'), DefaultNamedArg(int, 'fall_through'), DefaultNamedArg(int, 'break_frame'), DefaultNamedArg(int, 'continue_frame'), DefaultNamedArg(bool, 'conditional_frame'), DefaultNamedArg(bool, 'try_frame')], Iterator[Frame]]"; expected "Callable[[ConditionalTypeBinder, NamedArg(bool, 'can_skip'), DefaultNamedArg(int, 'fall_through'), DefaultNamedArg(int, 'break_frame'), DefaultNamedArg(int, 'continue_frame'), DefaultNamedArg(bool, 'conditional_frame'), DefaultNamedArg(bool, 'try_frame')], Generator[Never, None, None]]" [arg-type]
+ mypy/binder.py:459: error: Argument 1 to "contextmanager" has incompatible type "Callable[[ConditionalTypeBinder], Iterator[Frame]]"; expected "Callable[[ConditionalTypeBinder], Generator[Never, None, None]]" [arg-type]
+ mypy/typeanal.py:1709: error: Argument 1 to "contextmanager" has incompatible type "Callable[[TypeAnalyser, str], Iterator[None]]"; expected "Callable[[TypeAnalyser, str], Generator[Never, None, None]]" [arg-type]
+ mypy/semanal_namedtuple.py:664: error: Argument 1 to "contextmanager" has incompatible type "Callable[[NamedTupleAnalyzer, TypeInfo], Iterator[None]]"; expected "Callable[[NamedTupleAnalyzer, TypeInfo], Generator[Never, None, None]]" [arg-type]
+ mypy/semanal.py:504: error: Argument 1 to "contextmanager" has incompatible type "Callable[[SemanticAnalyzer], Iterator[None]]"; expected "Callable[[SemanticAnalyzer], Generator[Never, None, None]]" [arg-type]
+ mypy/semanal.py:795: error: Argument 1 to "contextmanager" has incompatible type "Callable[[SemanticAnalyzer, MypyFile, Options, Optional[TypeInfo]], Iterator[None]]"; expected "Callable[[SemanticAnalyzer, MypyFile, Options, Optional[TypeInfo]], Generator[Never, None, None]]" [arg-type]
+ mypy/semanal.py:1187: error: Argument 1 to "contextmanager" has incompatible type "Callable[[SemanticAnalyzer, Optional[int]], Iterator[None]]"; expected "Callable[[SemanticAnalyzer, Optional[int]], Generator[Never, None, None]]" [arg-type]
+ mypy/semanal.py:6722: error: Argument 1 to "contextmanager" has incompatible type "Callable[[SemanticAnalyzer, TypeVarLikeScope], Iterator[None]]"; expected "Callable[[SemanticAnalyzer, TypeVarLikeScope], Generator[Never, None, None]]" [arg-type]
+ mypy/semanal.py:6844: error: Argument 1 to "contextmanager" has incompatible type "Callable[[SemanticAnalyzer, Union[FuncItem, GeneratorExpr, DictionaryComprehension]], Iterator[None]]"; expected "Callable[[SemanticAnalyzer, Union[FuncItem, GeneratorExpr, DictionaryComprehension]], Generator[Never, None, None]]" [arg-type]
+ mypy/checkexpr.py:2840: error: Need type annotation for "m" [var-annotated]
+ mypy/checkexpr.py:3059: error: Argument 1 to "contextmanager" has incompatible type "Callable[[ExpressionChecker, Sequence[Expression], Sequence[Type]], Iterator[None]]"; expected "Callable[[ExpressionChecker, Sequence[Expression], Sequence[Type]], Generator[Never, None, None]]" [arg-type]
+ mypy/checkexpr.py:5197: error: Need type annotation for "tmap" [var-annotated]
+ mypy/checker.py:1138: error: Argument 1 to "contextmanager" has incompatible type "Callable[[TypeChecker], Iterator[None]]"; expected "Callable[[TypeChecker], Generator[Never, None, None]]" [arg-type]
+ mypy/checker.py:3468: error: Argument 1 to "contextmanager" has incompatible type "Callable[[TypeChecker, bool], Iterator[None]]"; expected "Callable[[TypeChecker, bool], Generator[Never, None, None]]" [arg-type]
+ mypy/checker.py:3807: error: Need type annotation for "assignments" [var-annotated]
+ mypy/checker.py:3807: note: See https://mypy.rtfd.io/en/stable/_refs.html#code-var-annotated for more info
+ mypy/checker.py:4285: error: Need type annotation for "type_map" [var-annotated]
+ mypy/checker.py:6903: error: Argument 1 to "contextmanager" has incompatible type "Callable[[TypeChecker], Iterator[None]]"; expected "Callable[[TypeChecker], Generator[Never, None, None]]" [arg-type]
+ mypy/checker.py:6992: error: Argument 1 to "contextmanager" has incompatible type "Callable[[TypeChecker], Iterator[Dict[Expression, Type]]]"; expected "Callable[[TypeChecker], Generator[Never, None, None]]" [arg-type]
+ mypy/checker.py:7060: error: Argument 1 to "contextmanager" has incompatible type "Callable[[TypeChecker, DefaultNamedArg(bool, 'is_function'), DefaultNamedArg(bool, 'is_class')], Iterator[None]]"; expected "Callable[[TypeChecker, DefaultNamedArg(bool, 'is_function'), DefaultNamedArg(bool, 'is_class')], Generator[Never, None, None]]" [arg-type]
+ mypy/checker.py:8205: error: Argument 1 to "contextmanager" has incompatible type "Callable[[CheckerScope, FuncItem], Iterator[None]]"; expected "Callable[[CheckerScope, FuncItem], Generator[Never, None, None]]" [arg-type]
+ mypy/checker.py:8211: error: Argument 1 to "contextmanager" has incompatible type "Callable[[CheckerScope, TypeInfo], Iterator[None]]"; expected "Callable[[CheckerScope, TypeInfo], Generator[Never, None, None]]" [arg-type]
+ mypy/stats.py:173: error: Argument 1 to "contextmanager" has incompatible type "Callable[[StatisticsVisitor, FuncDef], Iterator[None]]"; expected "Callable[[StatisticsVisitor, FuncDef], Generator[Never, None, None]]" [arg-type]
+ mypy/build.py:2055: error: Argument 1 to "contextmanager" has incompatible type "Callable[[State, bool], Iterator[None]]"; expected "Callable[[State, bool], Generator[Never, None, None]]" [arg-type]
+ mypyc/irbuild/builder.py:1157: error: Argument 1 to "contextmanager" has incompatible type "Callable[[IRBuilder, ClassIR, str, RType, Union[FuncInfo, str], Optional[RType]], Iterator[None]]"; expected "Callable[[IRBuilder, ClassIR, str, RType, Union[FuncInfo, str], Optional[RType]], Generator[Never, None, None]]" [arg-type]
+ mypy/test/teststubtest.py:19: error: Argument 1 to "contextmanager" has incompatible type "Callable[[str], Iterator[str]]"; expected "Callable[[str], Generator[Never, None, None]]" [arg-type]
+ mypy/test/teststubtest.py:150: error: Need type annotation for "tmp_dir" [var-annotated]
+ mypy/suggestions.py:289: error: Argument 1 to "contextmanager" has incompatible type "Callable[[SuggestionEngine, str], Iterator[None]]"; expected "Callable[[SuggestionEngine, str], Generator[Never, None, None]]" [arg-type]
+ mypy/suggestions.py:300: error: Argument 1 to "contextmanager" has incompatible type "Callable[[SuggestionEngine], Iterator[None]]"; expected "Callable[[SuggestionEngine], Generator[Never, None, None]]" [arg-type]
+ mypy/test/helpers.py:242: error: Argument 1 to "contextmanager" has incompatible type "Callable[[], Iterator[None]]"; expected "Callable[[], Generator[Never, None, None]]" [arg-type]
+ mypy/test/testpep561.py:30: error: Argument 1 to "contextmanager" has incompatible type "Callable[[str], Iterator[Tuple[str, str]]]"; expected "Callable[[str], Generator[Never, None, None]]" [arg-type]
+ mypy/test/testpep561.py:111: error: Need type annotation for "venv" [var-annotated]
+ mypyc/test/testutil.py:50: error: Argument 1 to "contextmanager" has incompatible type "Callable[[str, DataDrivenTestCase], Iterator[None]]"; expected "Callable[[str, DataDrivenTestCase], Generator[Never, None, None]]" [arg-type]
+ mypyc/test/test_run.py:125: error: Argument 1 to "contextmanager" has incompatible type "Callable[[str], Iterator[None]]"; expected "Callable[[str], Generator[Never, None, None]]" [arg-type]
bokeh (https://github.com/bokeh/bokeh)
+ src/bokeh/io/doc.py:67:2: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Document | UnlockedDocumentProxy], Iterator[None]]"; expected "Callable[[Document | UnlockedDocumentProxy], Generator[Never, None, None]]" [arg-type]
+ src/bokeh/embed/standalone.py: note: In function "file_html":
+ src/bokeh/embed/standalone.py:357:10: error: Need type annotation for "doc" [var-annotated]
+ src/bokeh/embed/standalone.py: note: In function "json_item":
+ src/bokeh/embed/standalone.py:428:10: error: Need type annotation for "doc" [var-annotated]
+ src/bokeh/io/export.py:400:2: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Plot, int | None, int | None], Iterator[None]]"; expected "Callable[[Plot, int | None, int | None], Generator[Never, None, None]]" [arg-type]
+ src/bokeh/command/util.py:187:2: error: Argument 1 to "contextmanager" has incompatible type "Callable[[str | None, int | None, KwArg(str)], Iterator[None]]"; expected "Callable[[str | None, int | None, KwArg(str)], Generator[Never, None, None]]" [arg-type]
cloud-init (https://github.com/canonical/cloud-init)
+ tests/integration_tests/conftest.py:269: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Any, Any, IntegrationCloud], Iterator[IntegrationInstance]]"; expected "Callable[[Any, Any, IntegrationCloud], Generator[Never, None, None]]" [arg-type]
+ tests/integration_tests/conftest.py:325: error: Need type annotation for "client" [var-annotated]
+ tests/integration_tests/conftest.py:334: error: Need type annotation for "client" [var-annotated]
+ tests/integration_tests/conftest.py:343: error: Need type annotation for "client" [var-annotated]
CPython (peg_generator) (https://github.com/python/cpython)
+ Tools/peg_generator/pegen/parser_generator.py:117: error: Argument 1 to "contextmanager" has incompatible type "Callable[[ParserGenerator], Iterator[None]]"; expected "Callable[[ParserGenerator], Generator[Never, None, None]]" [arg-type]
+ Tools/peg_generator/pegen/parser_generator.py:131: error: Argument 1 to "contextmanager" has incompatible type "Callable[[ParserGenerator], Iterator[None]]"; expected "Callable[[ParserGenerator], Generator[Never, None, None]]" [arg-type]
aiohttp (https://github.com/aio-libs/aiohttp)
+ aiohttp/test_utils.py:505:2: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Callable[[], AbstractEventLoop], bool], Iterator[AbstractEventLoop]]"; expected "Callable[[Callable[[], AbstractEventLoop], bool], Generator[Never, None, None]]" [arg-type]
+ aiohttp/pytest_plugin.py:254:10: error: Need type annotation for "_loop" [var-annotated]
+ aiohttp/pytest_plugin.py:254:10: note: See https://mypy.rtfd.io/en/stable/_refs.html#code-var-annotated for more info
+ aiohttp/pytest_plugin.py:266:10: error: Need type annotation for "_loop" [var-annotated]
anyio (https://github.com/agronholm/anyio)
+ src/anyio/pytest_plugin.py:29: error: Argument 1 to "contextmanager" has incompatible type "Callable[[str, dict[str, Any]], Iterator[TestRunner]]"; expected "Callable[[str, dict[str, Any]], Generator[Never, None, None]]" [arg-type]
+ src/anyio/pytest_plugin.py:73: error: Need type annotation for "runner" [var-annotated]
+ src/anyio/pytest_plugin.py:104: error: Need type annotation for "runner" [var-annotated]
+ src/anyio/pytest_plugin.py:123: error: Need type annotation for "runner" [var-annotated]
beartype (https://github.com/beartype/beartype)
+ beartype/_util/error/utilerrwarn.py:40: error: Argument 1 to "contextmanager" has incompatible type "Callable[[], Iterator[None]]"; expected "Callable[[], Generator[Never, None, None]]" [arg-type]
+ beartype/_data/module/datamodcontextlib.py:19: error: Argument 1 to "contextmanager" has incompatible type "Callable[[], Iterator[None]]"; expected "Callable[[], Generator[Never, None, None]]" [arg-type]
+ beartype/claw/_package/clawpkgcontext.py:37: error: Argument 1 to "contextmanager" has incompatible type "Callable[[DefaultNamedArg(BeartypeConf, 'conf')], Iterator[None]]"; expected "Callable[[DefaultNamedArg(BeartypeConf, 'conf')], Generator[Never, None, None]]" [arg-type]
+ beartype/claw/_package/clawpkgcontext.py:134: error: Argument 1 to "contextmanager" has incompatible type "Callable[[], Iterator[None]]"; expected "Callable[[], Generator[Never, None, None]]" [arg-type]
paasta (https://github.com/yelp/paasta)
+ paasta_tools/utils.py:1707: error: Argument 1 to "contextmanager" has incompatible type "Callable[[], Iterator[None]]"; expected "Callable[[], Generator[Never, None, None]]" [arg-type]
+ paasta_tools/utils.py:1809: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Union[IOBase, IO[Any]]], Iterator[None]]"; expected "Callable[[Union[IOBase, IO[Any]]], Generator[Never, None, None]]" [arg-type]
+ paasta_tools/utils.py:1818: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Union[IOBase, IO[Any]], int], Iterator[None]]"; expected "Callable[[Union[IOBase, IO[Any]], int], Generator[Never, None, None]]" [arg-type]
+ paasta_tools/utils.py:1824: error: Need type annotation for "flock_context" [var-annotated]
+ paasta_tools/utils.py:2924: error: Argument 1 to "contextmanager" has incompatible type "Callable[[str], Iterator[IO[Any]]]"; expected "Callable[[str], Generator[Never, None, None]]" [arg-type]
+ paasta_tools/utils.py:4270: error: Need type annotation for "fp" [var-annotated]
+ paasta_tools/utils.py:4294: error: Need type annotation for "fp" [var-annotated]
+ paasta_tools/generate_deployments_for_service.py:238: error: Need type annotation for "newf" [var-annotated]
artigraph (https://github.com/artigraph/artigraph)
+ src/arti/internal/__init__.py:7: error: Argument 1 to "contextmanager" has incompatible type "Callable[[type[Exception], NamedArg(str, 'prefix')], Iterator[None]]"; expected "Callable[[type[Exception], NamedArg(str, 'prefix')], Generator[Never, None, None]]" [arg-type]
+ src/arti/backends/__init__.py:122: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Self], Iterator[Self]]"; expected "Callable[[Never], Generator[Never, None, None]]" [arg-type]
+ src/arti/backends/__init__.py:144: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Backend], Iterator[Any]]"; expected "Callable[[Backend], Generator[Never, None, None]]" [arg-type]
+ src/arti/graphs/__init__.py:238: error: Invalid self argument "BackendConnection" to attribute function "connect" with type "Callable[[Never], _GeneratorContextManager[Never]]" [misc]
+ src/arti/graphs/__init__.py:238: error: Need type annotation for "conn" [var-annotated]
+ src/arti/graphs/__init__.py:283: error: Invalid self argument "BackendConnection" to attribute function "connect" with type "Callable[[Never], _GeneratorContextManager[Never]]" [misc]
+ src/arti/graphs/__init__.py:283: error: Need type annotation for "conn" [var-annotated]
+ src/arti/graphs/__init__.py:353: error: Invalid self argument "BackendConnection" to attribute function "connect" with type "Callable[[Never], _GeneratorContextManager[Never]]" [misc]
+ src/arti/graphs/__init__.py:353: error: Need type annotation for "conn" [var-annotated]
+ src/arti/graphs/__init__.py:373: error: Invalid self argument "BackendConnection" to attribute function "connect" with type "Callable[[Never], _GeneratorContextManager[Never]]" [misc]
+ src/arti/graphs/__init__.py:373: error: Need type annotation for "conn" [var-annotated]
+ src/arti/graphs/__init__.py:384: error: Invalid self argument "BackendConnection" to attribute function "connect" with type "Callable[[Never], _GeneratorContextManager[Never]]" [misc]
+ src/arti/graphs/__init__.py:384: error: Need type annotation for "conn" [var-annotated]
+ src/arti/graphs/__init__.py:385: error: Returning Any from function declared to return "GraphSnapshot" [no-any-return]
+ src/arti/executors/local.py:24: error: Need type annotation for "backend" [var-annotated]
+ src/arti/backends/memory.py:136: error: Argument 1 to "contextmanager" has incompatible type "Callable[[MemoryBackend], Iterator[MemoryConnection]]"; expected "Callable[[MemoryBackend], Generator[Never, None, None]]" [arg-type]
+ tests/arti/graphs/test_graph.py:141: error: Need type annotation for "conn" [var-annotated]
+ tests/arti/graphs/test_graph.py:198: error: Need type annotation for "conn" [var-annotated]
+ tests/arti/graphs/test_graph.py:252: error: Need type annotation for "conn" [var-annotated]
+ tests/arti/graphs/test_graph.py:440: error: Need type annotation for "conn" [var-annotated]
pydantic (https://github.com/pydantic/pydantic)
+ pydantic/_internal/_generics.py:387: error: Argument 1 to "contextmanager" has incompatible type "Callable[[type[BaseModel], tuple[Any, ...]], Iterator[PydanticRecursiveRef | None]]"; expected "Callable[[type[BaseModel], tuple[Any, ...]], Generator[Never, None, None]]" [arg-type]
+ pydantic/_internal/_generate_schema.py:656: error: "Never" object is not iterable [misc]
+ pydantic/_internal/_generate_schema.py:657: error: Cannot determine type of "maybe_schema" [has-type]
+ pydantic/_internal/_generate_schema.py:658: error: Cannot determine type of "maybe_schema" [has-type]
+ pydantic/_internal/_generate_schema.py:721: error: Cannot determine type of "model_ref" [has-type]
+ pydantic/_internal/_generate_schema.py:747: error: Cannot determine type of "model_ref" [has-type]
+ pydantic/_internal/_generate_schema.py:753: error: Cannot determine type of "model_ref" [has-type]
+ pydantic/_internal/_generate_schema.py:754: error: Cannot determine type of "model_ref" [has-type]
+ pydantic/_internal/_generate_schema.py:797: error: "Never" object is not iterable [misc]
+ pydantic/_internal/_generate_schema.py:798: error: Cannot determine type of "maybe_schema" [has-type]
+ pydantic/_internal/_generate_schema.py:799: error: Cannot determine type of "maybe_schema" [has-type]
- pydantic/_internal/_generate_schema.py:1395: error: Unused "type: ignore" comment [unused-ignore]
+ pydantic/_internal/_generate_schema.py:1381: error: "Never" object is not iterable [misc]
+ pydantic/_internal/_generate_schema.py:1382: error: Cannot determine type of "maybe_schema" [has-type]
+ pydantic/_internal/_generate_schema.py:1383: error: Cannot determine type of "maybe_schema" [has-type]
+ pydantic/_internal/_generate_schema.py:1396: error: Cannot determine type of "ref" [has-type]
+ pydantic/_internal/_generate_schema.py:1397: error: Cannot determine type of "ref" [has-type]
+ pydantic/_internal/_generate_schema.py:1430: error: "Never" object is not iterable [misc]
+ pydantic/_internal/_generate_schema.py:1434: error: Cannot determine type of "maybe_schema" [has-type]
+ pydantic/_internal/_generate_schema.py:1435: error: Cannot determine type of "maybe_schema" [has-type]
+ pydantic/_internal/_generate_schema.py:1508: error: Cannot determine type of "typed_dict_ref" [has-type]
+ pydantic/_internal/_generate_schema.py:1515: error: Cannot determine type of "typed_dict_ref" [has-type]
+ pydantic/_internal/_generate_schema.py:1516: error: Cannot determine type of "typed_dict_ref" [has-type]
+ pydantic/_internal/_generate_schema.py:1520: error: "Never" object is not iterable [misc]
+ pydantic/_internal/_generate_schema.py:1524: error: Cannot determine type of "maybe_schema" [has-type]
+ pydantic/_internal/_generate_schema.py:1525: error: Cannot determine type of "maybe_schema" [has-type]
+ pydantic/_internal/_generate_schema.py:1550: error: Cannot determine type of "namedtuple_ref" [has-type]
+ pydantic/_internal/_generate_schema.py:1744: error: "Never" object is not iterable [misc]
+ pydantic/_internal/_generate_schema.py:1748: error: Cannot determine type of "maybe_schema" [has-type]
+ pydantic/_internal/_generate_schema.py:1749: error: Cannot determine type of "maybe_schema" [has-type]
+ pydantic/_internal/_generate_schema.py:1831: error: Cannot determine type of "dataclass_ref" [has-type]
+ pydantic/_internal/_generate_schema.py:1842: error: Cannot determine type of "dataclass_ref" [has-type]
+ pydantic/_internal/_generate_schema.py:1843: error: Cannot determine type of "dataclass_ref" [has-type]
+ pydantic/_internal/_generate_schema.py:2495: error: Argument 1 to "contextmanager" has incompatible type "Callable[[_Definitions, Any], Iterator[tuple[str, None] | tuple[str, Any]]]"; expected "Callable[[_Definitions, Any], Generator[Never, None, None]]" [arg-type]
+ pydantic/_internal/_generate_schema.py:2542: error: Argument 1 to "contextmanager" has incompatible type "Callable[[_FieldNameStack, str], Iterator[None]]"; expected "Callable[[_FieldNameStack, str], Generator[Never, None, None]]" [arg-type]
+ pydantic/_internal/_generate_schema.py:2561: error: Argument 1 to "contextmanager" has incompatible type "Callable[[_ModelTypeStack, type], Iterator[None]]"; expected "Callable[[_ModelTypeStack, type], Generator[Never, None, None]]" [arg-type]
+ pydantic/main.py:727: error: Need type annotation for "maybe_self_type" [var-annotated]
+ pydantic/type_adapter.py:266: error: Argument 1 to "contextmanager" has incompatible type "Callable[[TypeAdapter[T], int], Iterator[None]]"; expected "Callable[[TypeAdapter[T], int], Generator[Never, None, None]]" [arg-type]
pybind11 (https://github.com/pybind/pybind11)
+ pybind11/setup_helpers.py:212: error: Argument 1 to "contextmanager" has incompatible type "Callable[[], Iterator[str]]"; expected "Callable[[], Generator[Never, None, None]]" [arg-type]
boostedblob (https://github.com/hauntsaninja/boostedblob)
+ boostedblob/globals.py:203: error: Argument 1 to "contextmanager" has incompatible type "Callable[[KwArg(Any)], Iterator[None]]"; expected "Callable[[KwArg(Any)], Generator[Never, None, None]]" [arg-type]
stone (https://github.com/dropbox/stone)
+ stone/backend.py:143: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Backend, str, str], Iterator[None]]"; expected "Callable[[Backend, str, str], Generator[Never, None, None]]" [arg-type]
+ stone/backend.py:184: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Backend, int | None], Iterator[None]]"; expected "Callable[[Backend, int | None], Generator[Never, None, None]]" [arg-type]
+ stone/backend.py:212: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Backend, StringIO], Iterator[None]]"; expected "Callable[[Backend, StringIO], Generator[Never, None, None]]" [arg-type]
+ stone/backend.py:442: error: Argument 1 to "contextmanager" has incompatible type "Callable[[CodeBackend, str, str, tuple[str, str], int | None, bool], Iterator[None]]"; expected "Callable[[CodeBackend, str, str, tuple[str, str], int | None, bool], Generator[Never, None, None]]" [arg-type]
+ stone/backends/python_helpers.py:55: error: Argument 1 to "contextmanager" has incompatible type "Callable[[CodeBackend], Iterator[None]]"; expected "Callable[[CodeBackend], Generator[Never, None, None]]" [arg-type]
sphinx (https://github.com/sphinx-doc/sphinx)
+ sphinx/util/parsing.py:69:2: error: Argument 1 to "contextmanager" has incompatible type "Callable[[RSTState], Iterator[None]]"; expected "Callable[[RSTState], Generator[Never, None, None]]" [arg-type]
+ sphinx/util/logging.py:248:2: error: Argument 1 to "contextmanager" has incompatible type "Callable[[], Iterator[Handler]]"; expected "Callable[[], Generator[Never, None, None]]" [arg-type]
+ sphinx/util/logging.py:276:2: error: Argument 1 to "contextmanager" has incompatible type "Callable[[], Iterator[MemoryHandler]]"; expected "Callable[[], Generator[Never, None, None]]" [arg-type]
+ sphinx/util/logging.py:305:2: error: Argument 1 to "contextmanager" has incompatible type "Callable[[], Iterator[MemoryHandler]]"; expected "Callable[[], Generator[Never, None, None]]" [arg-type]
+ sphinx/util/logging.py: note: In function "pending_logging":
+ sphinx/util/logging.py:319:14: error: Need type annotation for "memhandler" [var-annotated]
+ sphinx/util/logging.py: note: At top level:
+ sphinx/util/logging.py:325:2: error: Argument 1 to "contextmanager" has incompatible type "Callable[[bool], Iterator[None]]"; expected "Callable[[bool], Generator[Never, None, None]]" [arg-type]
+ sphinx/util/logging.py:345:2: error: Argument 1 to "contextmanager" has incompatible type "Callable[[str], Iterator[None]]"; expected "Callable[[str], Generator[Never, None, None]]" [arg-type]
+ sphinx/util/logging.py: note: In class "LogCollector":
+ sphinx/util/logging.py:395:6: error: Argument 1 to "contextmanager" has incompatible type "Callable[[LogCollector], Iterator[None]]"; expected "Callable[[LogCollector], Generator[Never, None, None]]" [arg-type]
+ sphinx/util/logging.py: note: In member "collect" of class "LogCollector":
+ sphinx/util/logging.py:397:14: error: Need type annotation for "memhandler" [var-annotated]
+ sphinx/util/docutils.py:45:2: error: Argument 1 to "contextmanager" has incompatible type "Callable[[], Iterator[None]]"; expected "Callable[[], Generator[Never, None, None]]" [arg-type]
+ sphinx/util/docutils.py:123:2: error: Argument 1 to "contextmanager" has incompatible type "Callable[[], Iterator[None]]"; expected "Callable[[], Generator[Never, None, None]]" [arg-type]
+ sphinx/util/docutils.py:143:2: error: Argument 1 to "contextmanager" has incompatible type "Callable[[], Iterator[None]]"; expected "Callable[[], Generator[Never, None, None]]" [arg-type]
+ sphinx/util/docutils.py:167:2: error: Argument 1 to "contextmanager" has incompatible type "Callable[[str | None], Iterator[None]]"; expected "Callable[[str | None], Generator[Never, None, None]]" [arg-type]
+ sphinx/util/docutils.py:183:2: error: Argument 1 to "contextmanager" has incompatible type "Callable[[str | None], Iterator[None]]"; expected "Callable[[str | None], Generator[Never, None, None]]" [arg-type]
+ sphinx/util/docutils.py:327:2: error: Argument 1 to "contextmanager" has incompatible type "Callable[[State[Any], StringList], Iterator[None]]"; expected "Callable[[State[Any], StringList], Generator[Never, None, None]]" [arg-type]
+ sphinx/ext/autodoc/mock.py:142:2: error: Argument 1 to "contextmanager" has incompatible type "Callable[[list[str]], Iterator[None]]"; expected "Callable[[list[str]], Generator[Never, None, None]]" [arg-type]
+ sphinx/util/rst.py:63:2: error: Argument 1 to "contextmanager" has incompatible type "Callable[[str, str], Iterator[None]]"; expected "Callable[[str, str], Generator[Never, None, None]]" [arg-type]
kopf (https://github.com/nolar/kopf)
+ kopf/_core/actions/invocation.py:73: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Iterable[tuple[ContextVar[Any], Any]]], Iterator[None]]"; expected "Callable[[Iterable[tuple[ContextVar[Any], Any]]], Generator[Never, None, None]]" [arg-type]
dd-trace-py (https://github.com/DataDog/dd-trace-py)
+ ddtrace/internal/opentelemetry/trace.py:144: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Tracer, str, Any | None, Any, Mapping[str, Any] | None, Sequence[Any] | None, int | None, bool, bool, bool], Iterator[Any]]"; expected "Callable[[Tracer, str, Any | None, Any, Mapping[str, Any] | None, Sequence[Any] | None, int | None, bool, bool, bool], Generator[Never, None, None]]" [arg-type]
trio (https://github.com/python-trio/trio)
+ src/trio/_core/_run.py:687: error: Argument 1 to "contextmanager" has incompatible type "Callable[[CancelScope], Iterator[None]]"; expected "Callable[[CancelScope], Generator[Never, None, None]]" [arg-type]
+ src/trio/_core/_tests/test_ki.py:132: error: Argument 1 to "contextmanager" has incompatible type "Callable[[], Iterator[None]]"; expected "Callable[[], Generator[Never, None, None]]" [arg-type]
+ src/trio/_tests/test_ssl.py:377: error: Argument 1 to "contextmanager" has incompatible type "Callable[[SSLContext, KwArg(Any)], Iterator[SSLStream[PyOpenSSLEchoStream]]]"; expected "Callable[[SSLContext, KwArg(Any)], Generator[Never, None, None]]" [arg-type]
+ src/trio/_tests/test_ssl.py:377: note: Error code "arg-type" not covered by "type: ignore" comment
+ src/trio/_tests/test_ssl.py:597: error: Need type annotation for "s" [var-annotated]
+ src/trio/_tests/test_ssl.py:649: error: Need type annotation for "s" [var-annotated]
+ src/trio/_core/_tests/test_thread_cache.py:109: error: Argument 1 to "contextmanager" has incompatible type "Callable[[], Iterator[None]]"; expected "Callable[[], Generator[Never, None, None]]" [arg-type]
pwndbg (https://github.com/pwndbg/pwndbg)
+ pwndbg/gdblib/scheduler.py:9: error: Argument 1 to "contextmanager" has incompatible type "Callable[[], Iterator[None]]"; expected "Callable[[], Generator[Never, None, None]]" [arg-type]
+ pwndbg/wrappers/checksec.py:12: error: Argument 1 to "contextmanager" has incompatible type "Callable[[], Iterator[None]]"; expected "Callable[[], Generator[Never, None, None]]" [arg-type]
django-stubs (https://github.com/typeddjango/django-stubs)
+ django-stubs/template/context.pyi:59: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Context, Template], Iterator[None]]"; expected "Callable[[Context, Template], Generator[Never, None, None]]" [arg-type]
+ django-stubs/template/context.pyi:66: error: Argument 1 to "contextmanager" has incompatible type "Callable[[RenderContext, Template, bool], Iterator[None]]"; expected "Callable[[RenderContext, Template, bool], Generator[Never, None, None]]" [arg-type]
+ django-stubs/template/context.pyi:87: error: Argument 1 to "contextmanager" has incompatible type "Callable[[RequestContext, Template], Iterator[None]]"; expected "Callable[[RequestContext, Template], Generator[Never, None, None]]" [arg-type]
+ django-stubs/db/transaction.pyi:21: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Optional[str]], Iterator[None]]"; expected "Callable[[Optional[str]], Generator[Never, None, None]]" [arg-type]
+ django-stubs/db/backends/base/base.pyi:102: error: Argument 1 to "contextmanager" has incompatible type "Callable[[BaseDatabaseWrapper], Iterator[None]]"; expected "Callable[[BaseDatabaseWrapper], Generator[Never, None, None]]" [arg-type]
+ django-stubs/test/utils.pyi:112: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Callable[..., Any]], Iterator[None]]"; expected "Callable[[Callable[..., Any]], Generator[Never, None, None]]" [arg-type]
+ django-stubs/test/utils.pyi:132: error: Argument 1 to "contextmanager" has incompatible type "Callable[[VarArg(str)], Iterator[None]]"; expected "Callable[[VarArg(str)], Generator[Never, None, None]]" [arg-type]
+ django-stubs/test/utils.pyi:134: error: Argument 1 to "contextmanager" has incompatible type "Callable[[str], Iterator[StringIO]]"; expected "Callable[[str], Generator[Never, None, None]]" [arg-type]
+ django-stubs/test/utils.pyi:139: error: Argument 1 to "contextmanager" has incompatible type "Callable[[float], Iterator[None]]"; expected "Callable[[float], Generator[Never, None, None]]" [arg-type]
+ django-stubs/test/utils.pyi:148: error: Argument 1 to "contextmanager" has incompatible type "Callable[[TimeKeeperProtocol, Any], Iterator[None]]"; expected "Callable[[TimeKeeperProtocol, Any], Generator[Never, None, None]]" [arg-type]
+ django-stubs/test/utils.pyi:174: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Type[RegisterLookupMixin], VarArg(Union[Type[Lookup[Any]], Type[Transform]]), DefaultNamedArg(Optional[str], 'lookup_name')], Iterator[None]]"; expected "Callable[[Type[RegisterLookupMixin], VarArg(Union[Type[Lookup[Any]], Type[Transform]]), DefaultNamedArg(Optional[str], 'lookup_name')], Generator[Never, None, None]]" [arg-type]
+ django-stubs/test/runner.pyi:147: error: Argument 1 to "contextmanager" has incompatible type "Callable[[DiscoverRunner], Iterator[None]]"; expected "Callable[[DiscoverRunner], Generator[Never, None, None]]" [arg-type]
+ django-stubs/db/migrations/state.pyi:95: error: Argument 1 to "contextmanager" has incompatible type "Callable[[StateApps], Iterator[None]]"; expected "Callable[[StateApps], Generator[Never, None, None]]" [arg-type]
cki-lib (https://gitlab.com/cki-project/cki-lib)
+ cki_lib/logger.py:25: error: Argument 1 to "contextmanager" has incompatible type "Callable[[dict[str, Any]], Iterator[None]]"; expected "Callable[[dict[str, Any]], Generator[Never, None, None]]" [arg-type]
+ tests/test_yaml.py:154: error: Argument 1 to "contextmanager" has incompatible type "Callable[[str], Iterator[None]]"; expected "Callable[[str], Generator[Never, None, None]]" [arg-type]
+ cki_lib/inttests/cluster.py:87: error: Argument 1 to "contextmanager" has incompatible type "Callable[[type[KubernetesCluster]], Iterator[None]]"; expected "Callable[[type[KubernetesCluster]], Generator[Never, None, None]]" [arg-type]
+ cki_lib/inttests/cluster.py:153: error: Argument 1 to "contextmanager" has incompatible type "Callable[[type[KubernetesCluster], str], Iterator[None]]"; expected "Callable[[type[KubernetesCluster], str], Generator[Never, None, None]]" [arg-type]
+ cki_lib/inttests/vault.py:23: error: Argument 1 to "contextmanager" has incompatible type "Callable[[type[HashiCorpVaultServer]], Iterator[None]]"; expected "Callable[[type[HashiCorpVaultServer]], Generator[Never, None, None]]" [arg-type]
+ cki_lib/inttests/minio.py:24: error: Argument 1 to "contextmanager" has incompatible type "Callable[[type[MinioServer]], Iterator[None]]"; expected "Callable[[type[MinioServer]], Generator[Never, None, None]]" [arg-type]
+ cki_lib/inttests/remote_responses.py:130: error: Argument 1 to "contextmanager" has incompatible type "Callable[[type[RemoteResponsesServer]], Iterator[None]]"; expected "Callable[[type[RemoteResponsesServer]], Generator[Never, None, None]]" [arg-type]
+ cki_lib/inttests/rabbitmq.py:37: error: Argument 1 to "contextmanager" has incompatible type "Callable[[type[RabbitMQServer]], Iterator[None]]"; expected "Callable[[type[RabbitMQServer]], Generator[Never, None, None]]" [arg-type]
+ cki_lib/inttests/mariadb.py:23: error: Argument 1 to "contextmanager" has incompatible type "Callable[[type[MariaDBServer]], Iterator[None]]"; expected "Callable[[type[MariaDBServer]], Generator[Never, None, None]]" [arg-type]
spark (https://github.com/apache/spark)
+ python/pyspark/errors/exceptions/captured.py:260: error: Argument 1 to "contextmanager" has incompatible type "Callable[[], Iterator[Any]]"; expected "Callable[[], Generator[Never, None, None]]" [arg-type]
+ python/pyspark/ml/torch/distributor.py:844: error: Argument 1 to "contextmanager" has incompatible type "Callable[[Iterator[Any], dict[str, Any]], Iterator[Any]]"; expected "Callable[[Iterator[Any], dict[str, Any]], Generator[Never, None, None]]"
... (truncated 425 lines) ...