How to auto generate docstrings in PyCharm for dataclasses?

3.5k views Asked by At

Is there a way for auto generating docstrings for dataclasses in the same fashion of the method and function docstrings? I did not find anything useful through help / search

from dataclasses import dataclass


@dataclass
class ExtractionConfig:
    """
    
    """
    gcp_bucket: str = None
    gcp_key: str = None
    log_file: str = None
    log_backup_count: int = 3
    delete_remotely: bool = True

When I try to manually add them, I get unresolved references:

unresolved refs

1

There are 1 answers

1
bentos On

Pycharm does not support it at this moment.

https://youtrack.jetbrains.com/issue/PY-28549