Skip to content

Commit 5ed8a42

Browse files
ml-evsCasperWA
andauthored
Fix docs builds with latest griffe (#2309)
Co-authored-by: Casper Welzel Andersen <casper.w.andersen@sintef.no>
1 parent f792ace commit 5ed8a42

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

optimade/filtertransformers/mongo.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import copy
77
import itertools
88
import warnings
9+
from collections.abc import Callable
910
from typing import Any
1011

1112
from lark import Token, v_args
@@ -567,19 +568,21 @@ def replace_str_date_with_datetime(subdict, prop, expr):
567568
)
568569

569570

570-
def recursive_postprocessing(filter_: dict | list, condition, replacement):
571+
def recursive_postprocessing(
572+
filter_: dict | list, condition: Callable, replacement: Callable
573+
):
571574
"""Recursively descend into the query, checking each dictionary
572575
(contained in a list, or as an entry in another dictionary) for
573576
the condition passed. If the condition is true, apply the
574577
replacement to the dictionary.
575578
576579
Parameters:
577-
filter_ : the filter_ to process.
578-
condition (callable): a function that returns True if the
580+
filter_: the filter to process.
581+
condition: a function that returns True if the
579582
replacement function should be applied. It should take
580583
as arguments the property and expression from the filter_,
581584
as would be returned by iterating over `filter_.items()`.
582-
replacement (callable): a function that returns the processed
585+
replacement: a function that returns the processed
583586
dictionary. It should take as arguments the dictionary
584587
to modify, the property and the expression (as described
585588
above).

requirements-docs.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
griffe==1.13.0
1+
griffe==1.14.0
22
mike==2.1.3
33
mkdocs==1.6.1
44
mkdocs-autorefs==1.4.3

0 commit comments

Comments
 (0)