You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The idea occurred to me when I want to use a tmp_file fixture from pytest for outPath, but it only accepts str because it calls len to sanitize outPath. I have to convert it to str.
As illustrated in PEP519, the type of outPath should be typing.Union[str, bytes, os.PathLike]. For our use case, I think str | os.PathLike should be fine (with from __future__ import annotations of course).
Converting str to Path will eliminate the need for sanitizing. Both onc.py and _util.py need to be changed.