github: DEPRECATE my.coding.github
Instead my.github.all should be used (still backward compatible) The reasons are a) I don't feel that grouping (i.e. my.coding.*) makes much sense b) using .all pattern (same way as twitter) allows for more composable and cleaner separation of GDPR and API data
This commit is contained in:
parent
d7aff1be3f
commit
ca39187c63
7 changed files with 286 additions and 244 deletions
17
my/github/all.py
Normal file
17
my/github/all.py
Normal file
|
@ -0,0 +1,17 @@
|
|||
from . import gdpr, ghexport
|
||||
|
||||
from .common import merge_events, Results
|
||||
|
||||
|
||||
def events() -> Results:
|
||||
yield from merge_events(
|
||||
gdpr.events(),
|
||||
ghexport.events(),
|
||||
)
|
||||
|
||||
|
||||
# todo hmm. not sure, maybe should be named sorted_events or something..
|
||||
# also, not great that it's in all.py... think of a better way...
|
||||
def get_events() -> Results:
|
||||
from ..core.error import sort_res_by
|
||||
return sort_res_by(events(), key=lambda e: e.dt)
|
Loading…
Add table
Add a link
Reference in a new issue