doctor: better quick option propogation for stats
* use contextmanager for quick stats instead of editing global state directly * send quick to lots of stat related functions, so they could possibly be used without doctor, if someone wanted to * if a stats function has a 'quick' kwarg, send the value there as well * add an option to sort locations in my.time.tz.via_location
This commit is contained in:
parent
f43eedd52a
commit
301ce5f35e
7 changed files with 57 additions and 17 deletions
|
@ -20,7 +20,7 @@ def get_stats(module: str) -> Optional[StatsFun]:
|
|||
# todo detect via ast?
|
||||
try:
|
||||
mod = import_module(module)
|
||||
except Exception as e:
|
||||
except Exception:
|
||||
return None
|
||||
|
||||
return getattr(mod, 'stats', None)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue