Type Checker inspection for function `str.casefold`
已回答
I'm scratching my head a bit on this. PyCharm is trying to tell me that there is no casefold function in my Python 3.4 source code.
In a python scratch file I get a type checker warning on the 'HEllo' string:
def do_casefold(s):
return s.casefold()
t = do_casefold('HEllo')
print(t)
If I put in a type annotation, then the warning moves to the casefold function call.
def do_casefold(s: str):
return s.casefold()
t = do_casefold('HELLo')
print(t)
I've tried a few other str built ins, but this one is the only one I've found that PyCharm doesn't seem to know about this.
Is there a cache that I need to rebuild, or has nobody told PyCharm about this (relatively new) function?
Thanks,
Seth
请先登录再写评论。
Hello Seth, thank you for the report.
It's a bug, please follow https://youtrack.jetbrains.com/issue/PY-23326 for updates. See https://intellij-support.jetbrains.com/hc/en-us/articles/207241135-How-to-follow-YouTrack-issues-and-receive-notifications if you are not familiar with YouTrack.