my.pdfs: cleanup/refactor

- modernize:
  - add REQUIRES spec for pdfannots library
  - config dataclass/config stub
  - stats function
  - absolute my.core imports in anticipation of splitting core
- use 'paths' instead of 'roots' (better reflects the semantics), use get_files
  backward compatible via config migration
- properly run tests/mypy
This commit is contained in:
Dima Gerasimov 2021-03-30 22:00:21 +01:00 committed by karlicoss
parent e7604c188e
commit ad177a1ccd
6 changed files with 177 additions and 108 deletions

View file

@ -29,6 +29,8 @@ def is_data_provider(fun) -> bool:
1. returns iterable or something like that
2. takes no arguments? (otherwise not callable by stats anyway?)
"""
# todo maybe for 2 allow default arguments? not sure
# one example which could benefit is my.pdfs
if fun is None:
return False
# todo. uh.. very similar to what cachew is trying to do?