core.common: move stats-related stuff to my.core.stats and add more thorough tests/docs
deprecate core.common.stat and core.common.Stats with backwards compatibility
This commit is contained in:
parent
18529257e7
commit
c45c51af22
14 changed files with 343 additions and 246 deletions
|
@ -1,5 +1,5 @@
|
|||
from typing import Iterator
|
||||
from my.core.common import Stats
|
||||
from my.core import stat, Stats
|
||||
from my.core.source import import_source
|
||||
|
||||
from .common import Save, Upvote, Comment, Submission, _merge_comments
|
||||
|
@ -58,7 +58,6 @@ def upvoted() -> Iterator[Upvote]:
|
|||
yield from upvoted()
|
||||
|
||||
def stats() -> Stats:
|
||||
from my.core import stat
|
||||
return {
|
||||
**stat(saved),
|
||||
**stat(comments),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue