my.reddit: refactor into module that supports pushshift/gdpr (#179)
* initial pushshift/rexport merge implementation, using id for merging * smarter module deprecation warning using regex * add `RedditBase` from promnesia * `import_source` helper for gracefully handing mixin data sources
This commit is contained in:
parent
b54ec0d7f1
commit
8422c6e420
15 changed files with 374 additions and 58 deletions
|
@ -10,7 +10,7 @@ C = TypeVar('C')
|
|||
def make_config(cls: Type[C], migration: Callable[[Attrs], Attrs]=lambda x: x) -> C:
|
||||
user_config = cls.__base__
|
||||
old_props = {
|
||||
# NOTE: deliberately use gettatr to 'force' lcass properties here
|
||||
# NOTE: deliberately use gettatr to 'force' class properties here
|
||||
k: getattr(user_config, k) for k in vars(user_config)
|
||||
}
|
||||
new_props = migration(old_props)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue