-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Unresolved attribute reference 'parse' for class 'object'... " in Pycharm IDE. #126
Comments
what version of parsedatetime? |
1.5 |
oh - silly me - you had that in your description - sorry! let me reproduce it and see if it's solved by the v2 code or not - thanks |
no problem ;) |
after thought: the IDE could be getting confused if it believes it is returning a plain object. I've seen similar behavior on functions that return a class object OR a dictionary. due to returning two different types, the IDE thinks it will always return the first return type. IE:
IDE will always assume the above is returning a dictionary, so code-completion on the "class()" class will not be given. I doubt this is the issue, but maybe a pointer to whats causing the issue |
looking at the code, I don't see why we could not just drop the "object" implementation:
to
|
if that solves this problem and the tests work, then yea let's get a PR for that going |
PR created |
Issue #126 - removed inheritance from object and removed return value…
Well, I think there must be a better reason for why PyCharm raised this error than inheritance of |
Well happy ending of this issue. See #128. |
Error:
"Unresolved attribute reference 'parse' for class 'object'... " in Pycharm IDE.
Version:
parsedatetime-1.5
Code to reproduce:
cal.parse
-> cal is not being detects as class Calendar and instead as object, which of course has no definition parse. Not sure what exactly is causing this, but my guess would be due to Calendar() being embedded in the init.py file.I do not see this issue while importing any other python modules.
The text was updated successfully, but these errors were encountered: