Path 1: 31 calls (0.55)

'data' (4) 'data.clientmodule_test' (4) 'data.property_pattern' (4) 'data.suppliermodule_test' (4) 'data.suppliermodule_test.CustomException' (4) 'dat...

NodeType (31)

NodeProperties (31)

1def emit_node(
2        self,
3        name: str,
4        type_: NodeType,
5        properties: NodeProperties | None = None,
6    ) -> None:
7        """Create a new node.
8
9        Nodes can be classes, packages, participants etc.
10        """
11        # pylint: disable=duplicate-code
12        if properties is None:
13            properties = NodeProperties(label=name)
14        stereotype = "~~Interface~~" if type_ is NodeType.INTERFACE else ""
15        nodetype = self.NODES[type_]
16        body = []
17        if properties.attrs:
18            body.extend(properties.attrs)
19        if properties.methods:
20            for func in properties.methods:
21                args = self._get_method_arguments(func)
22                line = f"{func.name}({', '.join(args)})"
23                line += "*" if func.is_abstract() else ""
24                if func.returns:
25                    line += f" {get_annotation_label(func.returns)}"
26                body.append(line)
27        name = name.split(".")[-1]
28        self.emit(f"{nodetype} {name}{stereotype} {{")
29        self._inc_indent()
30        for line in body:
31            self.emit(line)
32        self._dec_indent()
33        self.emit("}")
            

Path 2: 8 calls (0.14)

'data.property_pattern.PropertyPatterns' (4) 'attributes_annotation.Dummy2' (1) 'delayed_external_monkey_patching.Tree' (1) 'instance_attributes.Insta...

NodeType (8)

NodeProperties (8)

1def emit_node(
2        self,
3        name: str,
4        type_: NodeType,
5        properties: NodeProperties | None = None,
6    ) -> None:
7        """Create a new node.
8
9        Nodes can be classes, packages, participants etc.
10        """
11        # pylint: disable=duplicate-code
12        if properties is None:
13            properties = NodeProperties(label=name)
14        stereotype = "~~Interface~~" if type_ is NodeType.INTERFACE else ""
15        nodetype = self.NODES[type_]
16        body = []
17        if properties.attrs:
18            body.extend(properties.attrs)
19        if properties.methods:
20            for func in properties.methods:
21                args = self._get_method_arguments(func)
22                line = f"{func.name}({', '.join(args)})"
23                line += "*" if func.is_abstract() else ""
24                if func.returns:
25                    line += f" {get_annotation_label(func.returns)}"
26                body.append(line)
27        name = name.split(".")[-1]
28        self.emit(f"{nodetype} {name}{stereotype} {{")
29        self._inc_indent()
30        for line in body:
31            self.emit(line)
32        self._dec_indent()
33        self.emit("}")
            

Path 3: 8 calls (0.14)

'data.suppliermodule_test.DoSomething' (4) 'data.clientmodule_test.Specialization' (4)

NodeType (8)

NodeProperties (8)

1def emit_node(
2        self,
3        name: str,
4        type_: NodeType,
5        properties: NodeProperties | None = None,
6    ) -> None:
7        """Create a new node.
8
9        Nodes can be classes, packages, participants etc.
10        """
11        # pylint: disable=duplicate-code
12        if properties is None:
13            properties = NodeProperties(label=name)
14        stereotype = "~~Interface~~" if type_ is NodeType.INTERFACE else ""
15        nodetype = self.NODES[type_]
16        body = []
17        if properties.attrs:
18            body.extend(properties.attrs)
19        if properties.methods:
20            for func in properties.methods:
21                args = self._get_method_arguments(func)
22                line = f"{func.name}({', '.join(args)})"
23                line += "*" if func.is_abstract() else ""
24                if func.returns:
25                    line += f" {get_annotation_label(func.returns)}"
26                body.append(line)
27        name = name.split(".")[-1]
28        self.emit(f"{nodetype} {name}{stereotype} {{")
29        self._inc_indent()
30        for line in body:
31            self.emit(line)
32        self._dec_indent()
33        self.emit("}")
            

Path 4: 4 calls (0.07)

'data.clientmodule_test.Ancestor' (4)

NodeType (4)

NodeProperties (4)

1def emit_node(
2        self,
3        name: str,
4        type_: NodeType,
5        properties: NodeProperties | None = None,
6    ) -> None:
7        """Create a new node.
8
9        Nodes can be classes, packages, participants etc.
10        """
11        # pylint: disable=duplicate-code
12        if properties is None:
13            properties = NodeProperties(label=name)
14        stereotype = "~~Interface~~" if type_ is NodeType.INTERFACE else ""
15        nodetype = self.NODES[type_]
16        body = []
17        if properties.attrs:
18            body.extend(properties.attrs)
19        if properties.methods:
20            for func in properties.methods:
21                args = self._get_method_arguments(func)
22                line = f"{func.name}({', '.join(args)})"
23                line += "*" if func.is_abstract() else ""
24                if func.returns:
25                    line += f" {get_annotation_label(func.returns)}"
26                body.append(line)
27        name = name.split(".")[-1]
28        self.emit(f"{nodetype} {name}{stereotype} {{")
29        self._inc_indent()
30        for line in body:
31            self.emit(line)
32        self._dec_indent()
33        self.emit("}")
            

Path 5: 4 calls (0.07)

'data.suppliermodule_test.Interface' (4)

NodeType (4)

NodeProperties (4)

1def emit_node(
2        self,
3        name: str,
4        type_: NodeType,
5        properties: NodeProperties | None = None,
6    ) -> None:
7        """Create a new node.
8
9        Nodes can be classes, packages, participants etc.
10        """
11        # pylint: disable=duplicate-code
12        if properties is None:
13            properties = NodeProperties(label=name)
14        stereotype = "~~Interface~~" if type_ is NodeType.INTERFACE else ""
15        nodetype = self.NODES[type_]
16        body = []
17        if properties.attrs:
18            body.extend(properties.attrs)
19        if properties.methods:
20            for func in properties.methods:
21                args = self._get_method_arguments(func)
22                line = f"{func.name}({', '.join(args)})"
23                line += "*" if func.is_abstract() else ""
24                if func.returns:
25                    line += f" {get_annotation_label(func.returns)}"
26                body.append(line)
27        name = name.split(".")[-1]
28        self.emit(f"{nodetype} {name}{stereotype} {{")
29        self._inc_indent()
30        for line in body:
31            self.emit(line)
32        self._dec_indent()
33        self.emit("}")
            

Path 6: 1 calls (0.02)

'method_annotation.Monkey' (1)

NodeType (1)

NodeProperties (1)

1def emit_node(
2        self,
3        name: str,
4        type_: NodeType,
5        properties: NodeProperties | None = None,
6    ) -> None:
7        """Create a new node.
8
9        Nodes can be classes, packages, participants etc.
10        """
11        # pylint: disable=duplicate-code
12        if properties is None:
13            properties = NodeProperties(label=name)
14        stereotype = "~~Interface~~" if type_ is NodeType.INTERFACE else ""
15        nodetype = self.NODES[type_]
16        body = []
17        if properties.attrs:
18            body.extend(properties.attrs)
19        if properties.methods:
20            for func in properties.methods:
21                args = self._get_method_arguments(func)
22                line = f"{func.name}({', '.join(args)})"
23                line += "*" if func.is_abstract() else ""
24                if func.returns:
25                    line += f" {get_annotation_label(func.returns)}"
26                body.append(line)
27        name = name.split(".")[-1]
28        self.emit(f"{nodetype} {name}{stereotype} {{")
29        self._inc_indent()
30        for line in body:
31            self.emit(line)
32        self._dec_indent()
33        self.emit("}")