You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Indicate which type checker you are using (mypy or pyright).
pyright 1.1.286
Show the error message received from that type checker while checking your example.
pyright reports:
stack.py:7:28 - error: Argument of type "list[int]" cannot be assigned to parameter "level" of type "Level" in function "stack"
Type "list[int]" cannot be assigned to type "Level"
"list[int]" is incompatible with protocol "Hashable"
"__hash__" is an incompatible type
Type "None" cannot be assigned to type "(self: list[int]) -> int"
"list[int]" is incompatible with "int" (reportGeneralTypeIssues)
added list[Levels] as per #489 and added appropriate tests
added a generic Any for series output
created tests for stack
wrapping generics in quotes for compatibility
style update
twoertwein
pushed a commit
to twoertwein/pandas-stubs
that referenced
this issue
Apr 1, 2023
added list[Levels] as per pandas-dev#489 and added appropriate tests
added a generic Any for series output
created tests for stack
wrapping generics in quotes for compatibility
style update
Describe the bug
For
DataFrame.stack()
,level
is allowed to be a listTo Reproduce
pandas
example that is not properly checked by the stubs.mypy
orpyright
).pyright 1.1.286
pyright reports:
Please complete the following information:
pandas-stubs
1.5.2.221213Additional context
Change
pandas-stubs/pandas-stubs/core/frame.pyi
Line 1000 in ab1de1f
to allow
Level | list[Level]
for thelevel
argument.PR welcome with tests
The text was updated successfully, but these errors were encountered: