Skip to content

Within a module, we can shorten a.b.c.d... for readability #58

@FabriceSalvaire

Description

@FabriceSalvaire

Tested it works, we just need to test the target is in the current module.

    def render_method(self, item: ItemData) -> t.Iterable[str]:
        """Create the content for a method."""
        short_name = item["full_name"].split(".")[-1]
        show_annotations = self.show_annotations(item)
        sig = f"{short_name}({self.format_args(item['args'], show_annotations, ignore_self='self')})"
        if show_annotations and item.get("return_annotation"):

            _ = f" -> {self.format_annotation(item['return_annotation'])}"
            _ = _.replace('PySpice.Unit.Unit.', '')
            sig += _

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions