Skip to content

Update to griffe 1.0 or later (#27) #28

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading