mkdocstrings-matlab 1.0.1__py3-none-any.whl → 1.0.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,8 +4,8 @@ from __future__ import annotations
4
4
 
5
5
  import logging
6
6
 
7
- from _griffe.docstrings import google, numpy
8
- from _griffe.enumerations import DocstringSectionKind
7
+ from griffe._internal.docstrings import google, numpy
8
+ from griffe._internal.enumerations import DocstringSectionKind
9
9
 
10
10
  from mkdocstrings_handlers.matlab.config import MatlabConfig, MatlabOptions
11
11
  from mkdocstrings_handlers.matlab.handler import MatlabHandler, get_handler
@@ -11,13 +11,6 @@ from dataclasses import replace
11
11
  from re import Pattern
12
12
  from typing import TYPE_CHECKING, Any, Callable, ClassVar, Literal
13
13
 
14
- from _griffe.docstrings.models import (
15
- DocstringParameter,
16
- DocstringReturn,
17
- DocstringSectionOtherParameters,
18
- DocstringSectionParameters,
19
- DocstringSectionReturns,
20
- )
21
14
  from griffe import (
22
15
  AliasResolutionError,
23
16
  CyclicAliasError,
@@ -32,6 +25,13 @@ from griffe import (
32
25
  DocstringSectionModules,
33
26
  DocstringSectionText,
34
27
  )
28
+ from griffe._internal.docstrings.models import (
29
+ DocstringParameter,
30
+ DocstringReturn,
31
+ DocstringSectionOtherParameters,
32
+ DocstringSectionParameters,
33
+ DocstringSectionReturns,
34
+ )
35
35
  from jinja2 import pass_context
36
36
  from markupsafe import Markup
37
37
  from maxx.enums import ArgumentKind
@@ -792,25 +792,24 @@ class AutorefsHook(AutorefsHookInterface):
792
792
  The context.
793
793
  """
794
794
  role = {
795
- "property": "data"
796
- if self.current_object.parent and self.current_object.parent.is_module
797
- else "attr",
795
+ "property": "prop",
798
796
  "class": "class",
799
797
  "function": "meth"
800
798
  if self.current_object.parent and self.current_object.parent.is_class
801
799
  else "func",
802
- "module": "mod",
800
+ "namespace": "name",
801
+ "script": "script",
803
802
  }.get(self.current_object.kind.value.lower(), "obj")
804
803
  origin = self.current_object.path
805
804
  try:
806
- filepath = self.current_object.docstring.parent.filepath # type: ignore[union-attr]
807
- lineno = self.current_object.docstring.lineno or 0 # type: ignore[union-attr]
805
+ filepath = self.current_object.docstring.parent.filepath
806
+ lineno = self.current_object.docstring.lineno or 0
808
807
  except AttributeError:
809
808
  filepath = self.current_object.filepath
810
809
  lineno = 0
811
810
 
812
811
  return AutorefsHookInterface.Context(
813
- domain="py",
812
+ domain="mat",
814
813
  role=role,
815
814
  origin=origin,
816
815
  filepath=str(filepath),
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mkdocstrings-matlab
3
- Version: 1.0.1
3
+ Version: 1.0.3
4
4
  Summary: A MATLAB handler for mkdocstrings
5
5
  Author-email: Mark Hu <watermarkhu@gmail.com>
6
6
  License: MIT
@@ -21,7 +21,8 @@ Classifier: Topic :: Utilities
21
21
  Classifier: Typing :: Typed
22
22
  Requires-Python: <3.14,>=3.10
23
23
  Requires-Dist: charset-normalizer~=3.4
24
- Requires-Dist: maxx~=0.2.4
24
+ Requires-Dist: griffe~=1.12.1
25
+ Requires-Dist: maxx~=0.2.9
25
26
  Requires-Dist: mkdocs-autorefs~=1.4
26
27
  Requires-Dist: mkdocstrings~=0.29
27
28
  Requires-Dist: typing-extensions>=4.0; python_version < '3.11'
@@ -1,9 +1,9 @@
1
- mkdocstrings_handlers/matlab/__init__.py,sha256=_E7Q8fDJPmdKreDkw57ZNr2jwY7eoGCo6ZequXpXMbc,1703
1
+ mkdocstrings_handlers/matlab/__init__.py,sha256=zLE8MANvIbg-pEVFc9bGhhIUvqAjnSANBGqek-dm3LM,1721
2
2
  mkdocstrings_handlers/matlab/config.py,sha256=yuoB62JOm4vW5uJYd9mqvwIhtfmgSD34CMccc-9aEEc,26724
3
3
  mkdocstrings_handlers/matlab/handler.py,sha256=gD0ogRqzOlZAn_iv1E0xFflFj_tUmQcWUeWLPlp1RxI,9803
4
4
  mkdocstrings_handlers/matlab/logger.py,sha256=96hRpwOVyvEF0e9f8rvXnNBSBAuHEvM5a6bJNN8hjRo,3298
5
5
  mkdocstrings_handlers/matlab/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
- mkdocstrings_handlers/matlab/rendering.py,sha256=G35V7acGZ6Kw6-BnR4nU0k0EJqpmTr6sBVb0h-cet1s,25843
6
+ mkdocstrings_handlers/matlab/rendering.py,sha256=yhxpyAcEkCCC6of84ENip5QhEheVNl16E5jNjB53iZs,25726
7
7
  mkdocstrings_handlers/matlab/templates/material/attributes.html.jinja,sha256=3Wv9tRkBASmxW3NGdAw9V8mc7G6hc1pDIKmVQztlFJk,818
8
8
  mkdocstrings_handlers/matlab/templates/material/backlinks.html.jinja,sha256=FFrvIa-KH-DhT1cpc9HL0ecShR2gUVGs3VT9c1q88z8,467
9
9
  mkdocstrings_handlers/matlab/templates/material/children.html.jinja,sha256=gWV77R1BSkVlbQdY_VB9wrGSBY30bcm23skPTfOW1Fs,7517
@@ -35,7 +35,7 @@ mkdocstrings_handlers/matlab/templates/material/summary/classes.html.jinja,sha25
35
35
  mkdocstrings_handlers/matlab/templates/material/summary/functions.html.jinja,sha256=f19-RvEkHZO4VegiQApq71nAEA27RKwQW3S2NMmKrW4,860
36
36
  mkdocstrings_handlers/matlab/templates/material/summary/namespaces.html.jinja,sha256=J0aPYlktc5RY3Gax6GCZDxT5qgFDB5b3eqZZXfZOHxU,845
37
37
  mkdocstrings_handlers/matlab/templates/material/summary/properties.html.jinja,sha256=0wQeDtZzfLSZPHJzLG_MVzre1NSyoSHowTwYzk0JX1c,857
38
- mkdocstrings_matlab-1.0.1.dist-info/METADATA,sha256=B9jGXjuLIl7BrFIsXwyeUvxa-RZwl9lSgVG72c71wI8,4586
39
- mkdocstrings_matlab-1.0.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
40
- mkdocstrings_matlab-1.0.1.dist-info/licenses/LICENSE,sha256=TZQpwBuA3KLH56--XDAY2Qwo9gGdxeTITYhMOylmYhg,743
41
- mkdocstrings_matlab-1.0.1.dist-info/RECORD,,
38
+ mkdocstrings_matlab-1.0.3.dist-info/METADATA,sha256=qdRDwBSQOblg5p92bHxQXB8i-CcVle-U2_oSAoefeIM,4616
39
+ mkdocstrings_matlab-1.0.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
40
+ mkdocstrings_matlab-1.0.3.dist-info/licenses/LICENSE,sha256=TZQpwBuA3KLH56--XDAY2Qwo9gGdxeTITYhMOylmYhg,743
41
+ mkdocstrings_matlab-1.0.3.dist-info/RECORD,,