Skip to content

Commit

Permalink
docs: fix docs build
Browse files Browse the repository at this point in the history
  • Loading branch information
tlambert03 committed Sep 10, 2024
1 parent 6a39adf commit 7d16e44
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ repos:
- id: validate-pyproject

- repo: https://github.com/crate-ci/typos
rev: typos-dict-v0.11.27
rev: v1.24.5
hooks:
- id: typos

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.3
rev: v0.6.4
hooks:
- id: ruff
args: ["--fix"]
Expand Down
13 changes: 6 additions & 7 deletions docs/scripts/_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
from textwrap import dedent
from typing import TYPE_CHECKING, Any, Mapping

from griffe.dataclasses import Alias
from griffe.docstrings import numpy
from griffe import Alias
from mkdocstrings_handlers.python.handler import PythonHandler

from magicgui.type_map import get_widget_class
Expand All @@ -30,12 +29,12 @@
# TODO: figure out how to do this with options
@contextmanager
def _hide_numpy_warn():
if not hasattr(numpy, "_warn"):
yield
return
before, numpy._warn = numpy._warn, lambda *x, **k: None
# if not hasattr(numpy, "_warn"):
# yield
# return
# before, numpy._warn = numpy._warn, lambda *x, **k: None
yield
numpy._warn = before
# numpy._warn = before


def inject_dynamic_docstring(item: Alias, identifier: str) -> None:
Expand Down
9 changes: 5 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,16 @@ dev = [
docs = [
"mkdocs",
"mkdocs-material ~=9.5",
"mkdocstrings ==0.25.1",
"mkdocstrings-python ==1.10.5",
"mkdocstrings ==0.26.1",
"mkdocstrings-python ==1.11.1",
"griffe ==1.2.0",
"mkdocs-gen-files ==0.5.0",
"mkdocs-literate-nav ==0.6.1",
"mkdocs-spellcheck[all]",
"mkdocs-gallery ==0.10.1",
"mkdocs-gallery ==0.10.3",
"qtgallery ==0.0.2",
# extras for all the widgets
"napari ==0.5.0",
"napari ==0.5.3",
"pyqt6",
"pint",
"matplotlib",
Expand Down

0 comments on commit 7d16e44

Please sign in to comment.