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
mypy Lint
logilab/common/ error: Argument 1 to "join" has incompatible type "Optional[str]"; expected "Union[str, PathLike[str]]"
logilab/common/ error: Value of type variable "AnyStr" of "abspath" cannot be "Optional[str]"
logilab/common/ 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