mypy
mypy copied to clipboard
Error for invalid varargs and varkwargs to Any call
Fixes #18783
See also #18207
Diff from mypy_primer, showing the effect of this PR on open source code:
pandas (https://github.com/pandas-dev/pandas)
+ pandas/io/excel/_xlsxwriter.py:260: error: Expected iterable as variadic argument [misc]
pandera (https://github.com/pandera-dev/pandera)
+ tests/pandas/test_extensions.py:57: error: Argument after ** must be a mapping, not "object" [arg-type]
+ tests/pandas/test_extensions.py:99: error: Argument after ** must be a mapping, not "object" [arg-type]
apprise (https://github.com/caronc/apprise)
+ apprise/config/base.py:807: error: Argument after ** must be a mapping, not "str" [arg-type]
xarray (https://github.com/pydata/xarray)
+ xarray/core/common.py: note: In member "squeeze" of class "DataWithCoords":
+ xarray/core/common.py:460: error: Keywords must be strings [misc]
+ xarray/core/dataset.py: note: In member "_stack_once" of class "Dataset":
+ xarray/core/dataset.py:5204: error: Keywords must be strings [misc]
openlibrary (https://github.com/internetarchive/openlibrary)
+ openlibrary/core/imports.py: note: In member "add_items" of class "Batch":
+ openlibrary/core/imports.py:131: error: Argument after ** must be a mapping, not "str | dict[Any, Any]" [arg-type]
Surprised there were this many primer hits, but they seem right. I think error messages can be improved here, will land that after I land this
Diff from mypy_primer, showing the effect of this PR on open source code:
pandas (https://github.com/pandas-dev/pandas)
+ pandas/io/excel/_xlsxwriter.py:260: error: Expected iterable as variadic argument [misc]
pandera (https://github.com/pandera-dev/pandera)
+ tests/pandas/test_extensions.py:57: error: Argument after ** must be a mapping, not "object" [arg-type]
+ tests/pandas/test_extensions.py:99: error: Argument after ** must be a mapping, not "object" [arg-type]
apprise (https://github.com/caronc/apprise)
+ apprise/config/base.py:807: error: Argument after ** must be a mapping, not "str" [arg-type]
xarray (https://github.com/pydata/xarray)
+ xarray/core/common.py: note: In member "squeeze" of class "DataWithCoords":
+ xarray/core/common.py:460: error: Keywords must be strings [misc]
+ xarray/core/dataset.py: note: In member "_stack_once" of class "Dataset":
+ xarray/core/dataset.py:5204: error: Keywords must be strings [misc]
openlibrary (https://github.com/internetarchive/openlibrary)
+ openlibrary/core/imports.py: note: In member "add_items" of class "Batch":
+ openlibrary/core/imports.py:131: error: Argument after ** must be a mapping, not "str | dict[Any, Any]" [arg-type]
Diff from mypy_primer, showing the effect of this PR on open source code:
pandas (https://github.com/pandas-dev/pandas)
+ pandas/io/excel/_xlsxwriter.py:260: error: Expected iterable as variadic argument [misc]
pandera (https://github.com/pandera-dev/pandera)
+ tests/pandas/test_extensions.py:57: error: Argument after ** must be a mapping, not "object" [arg-type]
+ tests/pandas/test_extensions.py:99: error: Argument after ** must be a mapping, not "object" [arg-type]
apprise (https://github.com/caronc/apprise)
+ apprise/config/base.py:807: error: Argument after ** must be a mapping, not "str" [arg-type]
xarray (https://github.com/pydata/xarray)
+ xarray/core/common.py: note: In member "squeeze" of class "DataWithCoords":
+ xarray/core/common.py:460: error: Keywords must be strings [misc]
+ xarray/core/dataset.py: note: In member "_stack_once" of class "Dataset":
+ xarray/core/dataset.py:5204: error: Keywords must be strings [misc]
openlibrary (https://github.com/internetarchive/openlibrary)
+ openlibrary/core/imports.py: note: In member "add_items" of class "Batch":
+ openlibrary/core/imports.py:131: error: Argument after ** must be a mapping, not "str | dict[Any, Any]" [arg-type]
Diff from mypy_primer, showing the effect of this PR on open source code:
pandas (https://github.com/pandas-dev/pandas)
+ pandas/io/excel/_xlsxwriter.py:260: error: Expected iterable as variadic argument [misc]
pandera (https://github.com/pandera-dev/pandera)
+ tests/pandas/test_extensions.py:57: error: Argument after ** must be a mapping, not "object" [arg-type]
+ tests/pandas/test_extensions.py:99: error: Argument after ** must be a mapping, not "object" [arg-type]
apprise (https://github.com/caronc/apprise)
+ apprise/config/base.py:807: error: Argument after ** must be a mapping, not "str" [arg-type]
xarray (https://github.com/pydata/xarray)
+ xarray/core/common.py: note: In member "squeeze" of class "DataWithCoords":
+ xarray/core/common.py:460: error: Keywords must be strings [misc]
+ xarray/core/dataset.py: note: In member "_stack_once" of class "Dataset":
+ xarray/core/dataset.py:5204: error: Keywords must be strings [misc]
openlibrary (https://github.com/internetarchive/openlibrary)
+ openlibrary/core/imports.py: note: In member "add_items" of class "Batch":
+ openlibrary/core/imports.py:131: error: Argument after ** must be a mapping, not "str | dict[Any, Any]" [arg-type]