core: drop py36 support, update docs for reddit (#193)
* docs: update references to my.reddit * ci: remove 3.6, add 3.9
This commit is contained in:
parent
be21606075
commit
3f4fb64d56
7 changed files with 18 additions and 21 deletions
|
@ -66,10 +66,10 @@ def locate_function(module_name: str, function_name: str) -> Callable[[], Iterab
|
|||
|
||||
def locate_qualified_function(qualified_name: str) -> Callable[[], Iterable[ET]]:
|
||||
"""
|
||||
As an example, 'my.reddit.comments' -> locate_function('my.reddit', 'comments')
|
||||
As an example, 'my.reddit.rexport.comments' -> locate_function('my.reddit.rexport', 'comments')
|
||||
"""
|
||||
if "." not in qualified_name:
|
||||
raise QueryException("Could not find a '.' in the function name, e.g. my.reddit.comments")
|
||||
raise QueryException("Could not find a '.' in the function name, e.g. my.reddit.rexport.comments")
|
||||
rdot_index = qualified_name.rindex(".")
|
||||
return locate_function(qualified_name[:rdot_index], qualified_name[rdot_index + 1:])
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue