diff --git a/library-of-babel.org b/library-of-babel.org index ea58381c..171d1ba7 100644 --- a/library-of-babel.org +++ b/library-of-babel.org @@ -590,6 +590,7 @@ this default behavior. Below is a list of such options: * Python ** Collect RSS Feeds + #+header: :results output drawer #+name: collect-rss-feeds #+begin_src python #!/usr/bin/env python3 @@ -658,22 +659,22 @@ this default behavior. Below is a list of such options: #+end_src ** Contributing to git #+begin_src python :results output drawer :exports results - import os - from git import Repo + import os + from git import Repo - repo = Repo(os.path.abspath('.')) + repo = Repo(os.path.abspath('.')) - def org_list(l: list) -> list: - return [f"\n- {i}\n" for i in l] + def org_list(l) + return [f"\n- {i}\n" for i in l] - def unique(l: list) -> list: - return sorted(set(l)) + def unique(l) + return sorted(set(l)) - def authors(commits: list) -> list: - return [f"{i.author.name} <{i.author.email}>" for i in commits] + def authors(commits) + return [f"{i.author.name} <{i.author.email}>" for i in commits] - def commits(repo: Repo) -> list: - return list(repo.iter_commits("master")) + def commits(repo) + return list(repo.iter_commits("master")) - print(*org_list(unique(authors(commits(repo))))) + print(*org_list(unique(authors(commits(repo))))) #+end_src