-
-
Notifications
You must be signed in to change notification settings - Fork 12
bug: "cannot yet process" causes mkdocs build --strict to fail #31
Copy link
Copy link
Closed
Labels
refactorChange suggestion, not a bug nor a feature.Change suggestion, not a bug nor a feature.
Description
Description of the bug
Some cases that are not yet implemented cause mkdocs build --strict to fail
See:
| _logger.warning(f"cannot yet process {func}") |
To Reproduce
Unfortunately this doesn't reproduce the issue with Alias, but essentially this happens for internal Pydantic type Alias("Foo", __main__.Foo) in a similar case:
from typing import TYPE_CHECKING
from pydantic import BaseModel
if TYPE_CHECKING:
Foo = str
"""A foo string with validation or something."""
else:
Foo = str | bytes
class MyModel(BaseModel):
def func(self, foo: Foo) -> None:
print(foo)I'm not sure why Griffe is parsing the func as griffe.Alias in my case, but fundamentally it's a specific case that's not implemented in griffe-pydantic yet, that's not a problem.
Expected behavior
Ideally, I could silence this warning (or this type of warning) in the configuration.
I'm OK with this not being processed since it doesn't break the documentation.
I also can't see a way to change the logger level to logging.ERROR through the config.
Environment information
- System: Linux-6.6.87.1-microsoft-standard-WSL2-x86_64-with-glibc2.35
- Python: cpython 3.11.12 ()
- Environment variables:
- Installed packages:
griffe-pydanticv1.1.4
$ pip list | grep mkdocs
pip list | grep mkdocs
mkdocs 1.6.1
mkdocs-autorefs 1.4.2
mkdocs-click 0.5.0
mkdocs-get-deps 0.2.0
mkdocs-jupyter 0.25.1
mkdocs-material 9.5.50
mkdocs-material-extensions 1.3.1
mkdocstrings 0.29.1
mkdocstrings-python 1.16.12Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
refactorChange suggestion, not a bug nor a feature.Change suggestion, not a bug nor a feature.