Hugues Hoppe
Hugues Hoppe
Actually, it would be even better (clearer and more concise) if this produced the Python 3.10 syntax: `def test1_func(arg: str | int | None) ‑> None` It seems that `pdoc`...
Currently there is no way in `mediapy` to create a video with audio. It should be feasible because `mediapy` relies on `ffmpeg` to create the video container and `ffmpeg` allows...
Interesting; I can reproduce your results above, but then also: ```python >>> def f(a: int | str | Iterable[int | str] = 1): >>> return a >>> inspect.formatannotation(f.__annotations__) "{'a': 'int...
Actually, `f.__annotations__` already contains the nice strings: `{'a': 'int | str | Iterable[int | str]'}` I'm curious: what would be the drawbacks of directly using the strings from `f.__annotations__` for...
Amazing that you found this! I just confirmed on my code that this issue goes away when migrating to using `collections.abc`. It does make that `pdoc` documentation longer, e.g. `collections.abc.Iterable[...]`...
Thanks for the quick response! I just did some research and found that others had the same issue with Sphinx / `autodoc`: - https://stackoverflow.com/a/67483317 mentions postponed evaluation of annotations. (I...
The code in (1a) is intricate and I don't have the context to understand it well; I can see that it would become complicated to parse and reassemble the type...
The `make.py` approach sounds wonderful. It's also a nice place to specify many settings (like `logo`, `favicon`, etc.) rather than having an unwieldy command line.
We may want `simplify_annotation = _AnnotationReplacer()` without the `.__call__` so that we can later access the class instance. (I think the `__call__` member will get called automatically in `simplify_annotation()`.)
I've been using pytype in WSL (Windows Subsystem for Linux) for a while. I just tried **Windows-native Python** and was amazed that *just about everything I have ever used works*,...