Skip to content

Commit 8df468e

Browse files
Update to griffe 1.0 or later (#27)
1 parent a898f0d commit 8df468e

File tree

8 files changed

+14
-8
lines changed

8 files changed

+14
-8
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# mkdocstring-python-xref changes
22

3+
## 1.6.2
4+
5+
* Use griffe 1.0 or later
6+
37
## 1.6.1
48

59
* Available on conda-forge

environment.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ dependencies:
66
# runtime
77
- python >=3.8,<3.13
88
- mkdocstrings-python >=1.6.2,<2.0
9+
- griffe >=1.0
910
# build
10-
- build >=0.7.0
11+
- python-build >=1.0.0
1112
- hatchling >=1.21
1213
# test
1314
- coverage >=7.4.0

pyproject.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ keywords = [
2525
dynamic = ["version"]
2626
requires-python = ">=3.8"
2727
dependencies = [
28-
"mkdocstrings-python >=1.6.2,<2.0"
28+
"mkdocstrings-python >=1.6.2,<2.0",
29+
"griffe >=1.0"
2930
]
3031

3132
[project.urls]
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.6.1
1+
1.6.2

src/mkdocstrings_handlers/python_xref/crossref.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import re
1919
from typing import Callable, List, Optional, cast
2020

21-
from griffe.dataclasses import Docstring, Object
21+
from griffe import Docstring, Object
2222
from mkdocstrings.loggers import get_logger
2323

2424
__all__ = [
@@ -322,7 +322,7 @@ def substitute_relative_crossrefs(obj: Object, checkref: Optional[Callable[[str]
322322
"""Recursively expand relative cross-references in all docstrings in tree.
323323
324324
Arguments:
325-
obj: a Griffe [Object][griffe.dataclasses.] whose docstrings should be modified
325+
obj: a Griffe [Object][griffe.] whose docstrings should be modified
326326
checkref: optional function to check whether computed cross-reference is valid.
327327
Should return True if valid, False if not valid.
328328
"""

src/mkdocstrings_handlers/python_xref/handler.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
from pathlib import Path
2222
from typing import Any, List, Mapping, Optional
2323

24-
from griffe.dataclasses import Object
24+
from griffe import Object
2525
from mkdocstrings.loggers import get_logger
2626
from mkdocstrings_handlers.python.handler import PythonHandler
2727

tests/test_crossref.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
from typing import Callable, Optional
2323

2424
import pytest
25-
from griffe.dataclasses import Class, Docstring, Function, Module, Object
25+
from griffe import Class, Docstring, Function, Module, Object
2626

2727
# noinspection PyProtectedMember
2828
from mkdocstrings_handlers.python_xref.crossref import (

tests/test_handler.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
import pytest
2525

26-
from griffe.dataclasses import Docstring, Object, Module
26+
from griffe import Docstring, Object, Module
2727
from mkdocstrings.handlers.base import CollectionError
2828
from mkdocstrings_handlers.python.handler import PythonHandler
2929
from mkdocstrings_handlers.python_xref.handler import PythonRelXRefHandler

0 commit comments

Comments
 (0)