Created
September 21, 2024 23:45
-
-
Save serjflint/1b6ae0c2a94fb2774496d6779b52724f to your computer and use it in GitHub Desktop.
Mypy ternary
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
main.py:3: error: No overload variant of "max" matches argument types "float", "None" [call-overload] | |
main.py:3: note: Possible overload variants: | |
main.py:3: note: def [SupportsRichComparisonT] max(SupportsRichComparisonT, SupportsRichComparisonT, /, *_args: SupportsRichComparisonT, key: None = ...) -> SupportsRichComparisonT | |
main.py:3: note: def [_T] max(_T, _T, /, *_args: _T, key: Callable[[_T], Union[SupportsDunderLT[Any], SupportsDunderGT[Any]]]) -> _T | |
main.py:3: note: def [SupportsRichComparisonT] max(Iterable[SupportsRichComparisonT], /, *, key: None = ...) -> SupportsRichComparisonT | |
main.py:3: note: def [_T] max(Iterable[_T], /, *, key: Callable[[_T], Union[SupportsDunderLT[Any], SupportsDunderGT[Any]]]) -> _T | |
main.py:3: note: def [SupportsRichComparisonT, _T] max(Iterable[SupportsRichComparisonT], /, *, key: None = ..., default: _T) -> Union[SupportsRichComparisonT, _T] | |
main.py:3: note: def [_T1, _T2] max(Iterable[_T1], /, *, key: Callable[[_T1], Union[SupportsDunderLT[Any], SupportsDunderGT[Any]]], default: _T2) -> Union[_T1, _T2] | |
Found 1 error in 1 file (checked 1 source file) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment