Skip to content

Commit

Permalink
Merge pull request #28 from analog-garage/update-griffe
Browse files Browse the repository at this point in the history
Update to griffe 1.0 or later (#27)
  • Loading branch information
analog-cbarber authored Sep 19, 2024
2 parents a898f0d + 8df468e commit b0f9e78
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 8 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# mkdocstring-python-xref changes

## 1.6.2

* Use griffe 1.0 or later

## 1.6.1

* Available on conda-forge
Expand Down
3 changes: 2 additions & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ dependencies:
# runtime
- python >=3.8,<3.13
- mkdocstrings-python >=1.6.2,<2.0
- griffe >=1.0
# build
- build >=0.7.0
- python-build >=1.0.0
- hatchling >=1.21
# test
- coverage >=7.4.0
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ keywords = [
dynamic = ["version"]
requires-python = ">=3.8"
dependencies = [
"mkdocstrings-python >=1.6.2,<2.0"
"mkdocstrings-python >=1.6.2,<2.0",
"griffe >=1.0"
]

[project.urls]
Expand Down
2 changes: 1 addition & 1 deletion src/mkdocstrings_handlers/python_xref/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.6.1
1.6.2
4 changes: 2 additions & 2 deletions src/mkdocstrings_handlers/python_xref/crossref.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import re
from typing import Callable, List, Optional, cast

from griffe.dataclasses import Docstring, Object
from griffe import Docstring, Object
from mkdocstrings.loggers import get_logger

__all__ = [
Expand Down Expand Up @@ -322,7 +322,7 @@ def substitute_relative_crossrefs(obj: Object, checkref: Optional[Callable[[str]
"""Recursively expand relative cross-references in all docstrings in tree.
Arguments:
obj: a Griffe [Object][griffe.dataclasses.] whose docstrings should be modified
obj: a Griffe [Object][griffe.] whose docstrings should be modified
checkref: optional function to check whether computed cross-reference is valid.
Should return True if valid, False if not valid.
"""
Expand Down
2 changes: 1 addition & 1 deletion src/mkdocstrings_handlers/python_xref/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from pathlib import Path
from typing import Any, List, Mapping, Optional

from griffe.dataclasses import Object
from griffe import Object
from mkdocstrings.loggers import get_logger
from mkdocstrings_handlers.python.handler import PythonHandler

Expand Down
2 changes: 1 addition & 1 deletion tests/test_crossref.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from typing import Callable, Optional

import pytest
from griffe.dataclasses import Class, Docstring, Function, Module, Object
from griffe import Class, Docstring, Function, Module, Object

# noinspection PyProtectedMember
from mkdocstrings_handlers.python_xref.crossref import (
Expand Down
2 changes: 1 addition & 1 deletion tests/test_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

import pytest

from griffe.dataclasses import Docstring, Object, Module
from griffe import Docstring, Object, Module
from mkdocstrings.handlers.base import CollectionError
from mkdocstrings_handlers.python.handler import PythonHandler
from mkdocstrings_handlers.python_xref.handler import PythonRelXRefHandler
Expand Down

0 comments on commit b0f9e78

Please sign in to comment.