Path 1: 676 calls (0.71)

Pattern (676)

[] (676)

1def _parse_section(self, section_re: re.Pattern[str]) -> list[str]:
2        section_match = section_re.search(self.doc)
3        if section_match is None:
4            return []
5
6        min_indentation = self.min_section_indent(section_match)
7
8        entries: list[str] = []
9        entry: list[str] = []
10        is_first = True
11        for line in section_match.group(2).splitlines():
12            if not line.strip():
13                continue
14            indentation = space_indentation(line)
15            if indentation < min_indentation:
16                break
17
18            # The first line after the header defines the minimum
19            # indentation.
20            if is_first:
21                min_indentation = indentation
22                is_first = False
23
24            if indentation == min_indentation:
25                if self._is_section_header(line):
26                    break
27                # Lines with minimum indentation must contain the beginning
28                # of a new parameter documentation.
29                if entry:
30                    entries.append("\n".join(entry))
31                    entry = []
32
33            entry.append(line)
34
35        if entry:
36            entries.append("\n".join(entry))
37
38        return entries
            

Path 2: 199 calls (0.21)

Pattern (199)

[' RuntimeError: Always'] (14) [' RuntimeError\n Always'] (14) [' NameError: Sometimes'] (10) [' NameError\n ...

1def _parse_section(self, section_re: re.Pattern[str]) -> list[str]:
2        section_match = section_re.search(self.doc)
3        if section_match is None:
4            return []
5
6        min_indentation = self.min_section_indent(section_match)
7
8        entries: list[str] = []
9        entry: list[str] = []
10        is_first = True
11        for line in section_match.group(2).splitlines():
12            if not line.strip():
13                continue
14            indentation = space_indentation(line)
15            if indentation < min_indentation:
16                break
17
18            # The first line after the header defines the minimum
19            # indentation.
20            if is_first:
21                min_indentation = indentation
22                is_first = False
23
24            if indentation == min_indentation:
25                if self._is_section_header(line):
26                    break
27                # Lines with minimum indentation must contain the beginning
28                # of a new parameter documentation.
29                if entry:
30                    entries.append("\n".join(entry))
31                    entry = []
32
33            entry.append(line)
34
35        if entry:
36            entries.append("\n".join(entry))
37
38        return entries
            

Path 3: 47 calls (0.05)

Pattern (47)

[' RuntimeError: Always', ' NameError, OSError, ValueError: Never'] (8) [' RuntimeError: Always', ' NameError: Never'] (4)...

1def _parse_section(self, section_re: re.Pattern[str]) -> list[str]:
2        section_match = section_re.search(self.doc)
3        if section_match is None:
4            return []
5
6        min_indentation = self.min_section_indent(section_match)
7
8        entries: list[str] = []
9        entry: list[str] = []
10        is_first = True
11        for line in section_match.group(2).splitlines():
12            if not line.strip():
13                continue
14            indentation = space_indentation(line)
15            if indentation < min_indentation:
16                break
17
18            # The first line after the header defines the minimum
19            # indentation.
20            if is_first:
21                min_indentation = indentation
22                is_first = False
23
24            if indentation == min_indentation:
25                if self._is_section_header(line):
26                    break
27                # Lines with minimum indentation must contain the beginning
28                # of a new parameter documentation.
29                if entry:
30                    entries.append("\n".join(entry))
31                    entry = []
32
33            entry.append(line)
34
35        if entry:
36            entries.append("\n".join(entry))
37
38        return entries
            

Path 4: 14 calls (0.01)

Pattern (14)

[' this (str): Printed first', ' other (int): Other args'] (2) [' x: bla', ' z (int): bar'] (1) [' x: b...

1def _parse_section(self, section_re: re.Pattern[str]) -> list[str]:
2        section_match = section_re.search(self.doc)
3        if section_match is None:
4            return []
5
6        min_indentation = self.min_section_indent(section_match)
7
8        entries: list[str] = []
9        entry: list[str] = []
10        is_first = True
11        for line in section_match.group(2).splitlines():
12            if not line.strip():
13                continue
14            indentation = space_indentation(line)
15            if indentation < min_indentation:
16                break
17
18            # The first line after the header defines the minimum
19            # indentation.
20            if is_first:
21                min_indentation = indentation
22                is_first = False
23
24            if indentation == min_indentation:
25                if self._is_section_header(line):
26                    break
27                # Lines with minimum indentation must contain the beginning
28                # of a new parameter documentation.
29                if entry:
30                    entries.append("\n".join(entry))
31                    entry = []
32
33            entry.append(line)
34
35        if entry:
36            entries.append("\n".join(entry))
37
38        return entries
            

Path 5: 11 calls (0.01)

Pattern (11)

[' named_arg : object\n Returned', ' Returns'] (2) [' xarg: int\n bla xarg', ' yarg: my.qualified.type\n bla yarg', '...

1def _parse_section(self, section_re: re.Pattern[str]) -> list[str]:
2        section_match = section_re.search(self.doc)
3        if section_match is None:
4            return []
5
6        min_indentation = self.min_section_indent(section_match)
7
8        entries: list[str] = []
9        entry: list[str] = []
10        is_first = True
11        for line in section_match.group(2).splitlines():
12            if not line.strip():
13                continue
14            indentation = space_indentation(line)
15            if indentation < min_indentation:
16                break
17
18            # The first line after the header defines the minimum
19            # indentation.
20            if is_first:
21                min_indentation = indentation
22                is_first = False
23
24            if indentation == min_indentation:
25                if self._is_section_header(line):
26                    break
27                # Lines with minimum indentation must contain the beginning
28                # of a new parameter documentation.
29                if entry:
30                    entries.append("\n".join(entry))
31                    entry = []
32
33            entry.append(line)
34
35        if entry:
36            entries.append("\n".join(entry))
37
38        return entries
            

Path 6: 8 calls (0.01)

Pattern (8)

[' y: bla'] (2) [' y: bla'] (2) [' named_arg (object): Returned'] (2) [' yarg1 (float): bla yarg'] (1) [' yarg ...

1def _parse_section(self, section_re: re.Pattern[str]) -> list[str]:
2        section_match = section_re.search(self.doc)
3        if section_match is None:
4            return []
5
6        min_indentation = self.min_section_indent(section_match)
7
8        entries: list[str] = []
9        entry: list[str] = []
10        is_first = True
11        for line in section_match.group(2).splitlines():
12            if not line.strip():
13                continue
14            indentation = space_indentation(line)
15            if indentation < min_indentation:
16                break
17
18            # The first line after the header defines the minimum
19            # indentation.
20            if is_first:
21                min_indentation = indentation
22                is_first = False
23
24            if indentation == min_indentation:
25                if self._is_section_header(line):
26                    break
27                # Lines with minimum indentation must contain the beginning
28                # of a new parameter documentation.
29                if entry:
30                    entries.append("\n".join(entry))
31                    entry = []
32
33            entry.append(line)
34
35        if entry:
36            entries.append("\n".join(entry))
37
38        return entries
            

Path 7: 1 calls (0.0)

Pattern (1)

[] (1)

1def _parse_section(self, section_re: re.Pattern[str]) -> list[str]:
2        section_match = section_re.search(self.doc)
3        if section_match is None:
4            return []
5
6        min_indentation = self.min_section_indent(section_match)
7
8        entries: list[str] = []
9        entry: list[str] = []
10        is_first = True
11        for line in section_match.group(2).splitlines():
12            if not line.strip():
13                continue
14            indentation = space_indentation(line)
15            if indentation < min_indentation:
16                break
17
18            # The first line after the header defines the minimum
19            # indentation.
20            if is_first:
21                min_indentation = indentation
22                is_first = False
23
24            if indentation == min_indentation:
25                if self._is_section_header(line):
26                    break
27                # Lines with minimum indentation must contain the beginning
28                # of a new parameter documentation.
29                if entry:
30                    entries.append("\n".join(entry))
31                    entry = []
32
33            entry.append(line)
34
35        if entry:
36            entries.append("\n".join(entry))
37
38        return entries