Skip to content
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

parameter type cannot be recognized properly in Numpy style docstring #292

Open
wohenbushuang opened this issue Oct 17, 2024 · 0 comments
Open
Labels

Comments

@wohenbushuang
Copy link

wohenbushuang commented Oct 17, 2024

Describe the bug

In the following case, dict type of node_attr cannot be recognized.

By the way, can the parameter default value move up to be after the type description for more attention?
Besides, change by default to default as Numpy Style Guide does

Versions (please complete the following information):

  • autoDocstring Version: v0.6.1
  • Operating System: Win 10
  • Vscode Version: v1.94.2

Original Code (with line to generate on):

class Test:
    def load_graph_file(
            self,
            filename: str,
            node_attr: dict = {"successor_idx": "successor_idx"},
            edge_attr: dict = {},
        ):
        pass
        # generate on this line

Expected Result:

        """_summary_

        Parameters
        ----------
        filename : str
            _description_
        node_attr : dict, optional, default {"successor_idx": "successor_idx"}
            _description_
        edge_attr : dict, optional, default {}
            _description_
        """

Actual Result:

        """_summary_

        Parameters
        ----------
        filename : str
            _description_
        node_attr : _type_, optional
            _description_, by default {"successor_idx": "successor_idx"}
        edge_attr : dict, optional
            _description_, by default {}
        """
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant