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 detached
Status Name Job ID Coverage
  Lint
passed black #504611
lint black

00:00:39

passed check-manifest #504614
lint check-manifest

00:00:36

passed flake8 #504612
lint flake8

00:00:42

failed mypy #504613
lint mypy allowed to fail

00:00:43

 
  Tests
passed py3 #504615
tests py3

00:01:01

passed py38 #504616
tests py3

00:01:06

 
  After Tests
passed trigger-cubicweb-pipeline

passed trigger-logilab-constraint-pipeline

passed trigger-logilab-database-pipeline

passed trigger-logilab-mtconverter-pipeline

passed trigger-rql-pipeline

passed trigger-yams-pipeline

 
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