fix(typing): correctly type `cached` decorator

12 jobs for !47 with topic/default/cached-typing in 1 minute and 18 seconds (queued for 26 seconds)
latest merge request
Name Stage Failure
failed
mypy Lint
logilab/common/testlib.py:369: error: Argument 1 to "join" has incompatible type "Optional[str]"; expected "Union[str, PathLike[str]]"
logilab/common/testlib.py:369: error: Value of type variable "AnyStr" of "abspath" cannot be "Optional[str]"
logilab/common/registry.py:560: error: Argument 3 to "getattr" has incompatible type "int"; expected "str"
Found 10 errors in 5 files (checked 41 source files)
ERROR: InvocationError for command /builds/open-source/logilab-common/.tox/mypy/bin/mypy --ignore-missing-imports logilab (exited with code 1)
___________________________________ summary ____________________________________
ERROR: mypy: commands failed
Cleaning up file based variables
ERROR: Job failed: command terminated with exit code 1