-
Notifications
You must be signed in to change notification settings - Fork 156
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
[Bug]: Intellisense Not Working #402
Comments
It's written in the README that there is better support when subclassing from dataclasses import dataclass
from dataclasses_json import DataClassJsonMixin
@dataclass
class Person(DataClassJsonMixin):
name: str
lidatong = Person('lidatong') |
Hey @rpmcginty I found a really nice way around this: change dataclasses-json/dataclasses_json/api.py Line 127 in 39b4c2f
to def _process_class(cls, letter_case, undefined) -> Type[DataClassJsonMixin]: When I made this change locally, pycharm immediately recognized all the methods. I imagine VSCode will benefit similarly. |
@PayemSaba , I say go for it and create a PR if you can get it working. I can help if you'd like. |
Reopening this issue as #411 has been reverted and it seems we don't have a good solution right now with the current API |
I am using
dataclasses-json
in my project. I am using the following sample code:However, the
.to_json()
method is not in VSCode's intellisense. I cannot seem to understand why. Some of the fields provided bydataclass
decorator are there, however. Can anybody replicate?The text was updated successfully, but these errors were encountered: