PyCharm Code inspection: Function 'max' doesn't return anything
Answered
For following code:
test1 = max([])
test2 = max([], default=None)
test3 = max([], default=0)
On code inspection I'm getting error "Function 'max' doesn't return anything", but only for test2 line. The same happens with `min` function.
Environment:
PyCharm 2017.3.3 (Professional Edition)
Build #PY-173.4301.16, built on January 11, 2018
JRE: 1.8.0_152-release-1024-b11 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Linux
Please sign in to leave a comment.
Thanks for creating issue on YouTrack: https://youtrack.jetbrains.com/issue/PY-28729
Please follow it for updates.