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
{{ message }}
This repository was archived by the owner on Apr 14, 2022. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 14, 2022. It is now read-only.
time.strptime (and others) info not being pulled from typeshed #300
deflocaltime():
"localtime([seconds]) -> (tm_year,tm_mon,tm_mday,tm_hour,tm_min,\n tm_sec,tm_wday,tm_yday,tm_isdst)\n\nConvert seconds since ..."# truncatedreturntuple()
Which is sort of correct, since struct_time is a NamedTuple, but offers no completions, whereas the actual struct_time in the same pyi file actually contains the right information about its properties.
Even with #321. It claims to return struct_time in the hover, but almost everything is str, except for __new__ which says it's from struct_time.
Now, if you assign its result, and hover:
The part where you can't complete struct_time's members is probably #15, but the fact that the analyzer is claiming it's returning a string is not.
In no path should strptime return a str, and the typeshed for the time module says struct_time. I might be wrong about this, as I haven't yet explored that part of the code, but I think the fact that a pyi file shows up in languageServer means that it's the scraper that's doing this.
Activity
MikhailArkhipov commentedon Oct 24, 2018
#15
MikhailArkhipov commentedon Oct 30, 2018
So what's wrong with
If the case is about named tuple, then it is dupe of #15. Otherwise signatures and return types appear correct.
jakebailey commentedon Oct 30, 2018
Even with #321. It claims to return
struct_timein the hover, but almost everything isstr, except for__new__which says it's fromstruct_time.Now, if you assign its result, and hover:
The part where you can't complete
struct_time's members is probably #15, but the fact that the analyzer is claiming it's returning a string is not.In no path should strptime return a
str, and the typeshed for thetimemodule saysstruct_time. I might be wrong about this, as I haven't yet explored that part of the code, but I think the fact that apyifile shows up inlanguageServermeans that it's the scraper that's doing this.MikhailArkhipov commentedon Jan 30, 2019
New LS does
MikhailArkhipov commentedon Feb 6, 2019
#546