|
3 | 3 | from collections import defaultdict, deque |
4 | 4 | from copy import copy, deepcopy |
5 | 5 | from pathlib import Path |
6 | | -from typing import Any, Mapping, Sequence, Callable, TypeVar |
| 6 | +from typing import Any, Callable, Mapping, Sequence, TypeVar |
7 | 7 |
|
8 | | -from _griffe.collections import LinesCollection as GLC, ModulesCollection |
| 8 | +from _griffe.collections import LinesCollection as GLC |
| 9 | +from _griffe.collections import ModulesCollection |
9 | 10 | from _griffe.docstrings.models import ( |
| 11 | + DocstringParameter, |
| 12 | + DocstringReturn, |
10 | 13 | DocstringSectionOtherParameters, |
11 | 14 | DocstringSectionParameters, |
12 | 15 | DocstringSectionReturns, |
13 | | - DocstringParameter, |
14 | | - DocstringReturn, |
15 | 16 | ) |
16 | 17 | from _griffe.enumerations import DocstringSectionKind |
17 | 18 | from _griffe.expressions import Expr |
18 | 19 |
|
19 | 20 | from mkdocstrings_handlers.matlab.enums import ParameterKind |
20 | 21 | from mkdocstrings_handlers.matlab.models import ( |
21 | | - _ParentGrabber, |
22 | 22 | Class, |
23 | 23 | Classfolder, |
24 | 24 | Docstring, |
25 | 25 | DocstringSectionText, |
26 | | - Function, |
27 | 26 | Folder, |
| 27 | + Function, |
28 | 28 | MatlabMixin, |
29 | 29 | Namespace, |
30 | 30 | PathMixin, |
| 31 | + _ParentGrabber, |
31 | 32 | ) |
32 | 33 | from mkdocstrings_handlers.matlab.treesitter import FileParser |
33 | 34 |
|
34 | | - |
35 | 35 | PathType = TypeVar("PathType", bound=PathMixin) |
36 | 36 |
|
37 | 37 | __all__ = ["LinesCollection", "PathCollection"] |
@@ -198,7 +198,6 @@ def resolve( |
198 | 198 | elif self._config_path is not None and "/" in identifier: |
199 | 199 | absolute_path = (self._config_path / Path(identifier)).resolve() |
200 | 200 | if absolute_path.exists(): |
201 | | - |
202 | 201 | if absolute_path.suffix: |
203 | 202 | path, member = absolute_path.parent, absolute_path.stem |
204 | 203 | else: |
@@ -549,9 +548,7 @@ def addpath(self, path: str | Path, to_end: bool = False, recursive: bool = Fals |
549 | 548 | ]: |
550 | 549 | if member.parent.is_relative_to(self._config_path): |
551 | 550 | if member.parent not in self._folders: |
552 | | - self._folders[member.parent] = LazyModel( |
553 | | - member.parent, self |
554 | | - ) |
| 551 | + self._folders[member.parent] = LazyModel(member.parent, self) |
555 | 552 | else: |
556 | 553 | pass # TODO: Issue warning? |
557 | 554 |
|
|
0 commit comments