diff options
author | Alexander Kabui | 2021-05-07 08:27:02 +0300 |
---|---|---|
committer | BonfaceKilz | 2021-05-07 12:01:15 +0300 |
commit | 5c474e24fa43cdffacd698cd3a1e9e5182a49016 (patch) | |
tree | 6bc2961ee63b637d1497a6ca7c9945df9e7c8b81 /wqflask | |
parent | b5db22e76677a85055d2f9b22214e9eeea876071 (diff) | |
download | genenetwork2-5c474e24fa43cdffacd698cd3a1e9e5182a49016.tar.gz |
Add typing + autopep8 formatting
Diffstat (limited to 'wqflask')
-rw-r--r-- | wqflask/wqflask/markdown_routes.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/wqflask/wqflask/markdown_routes.py b/wqflask/wqflask/markdown_routes.py index 28bd6e4b..b81bfb55 100644 --- a/wqflask/wqflask/markdown_routes.py +++ b/wqflask/wqflask/markdown_routes.py @@ -2,17 +2,21 @@ Render pages from github, or if they are unavailable, look for it else where """ + import requests import markdown import os import sys -from bs4 import BeautifulSoup +from bs4 import BeautifulSoup # type: ignore from flask import send_from_directory from flask import Blueprint from flask import render_template +from typing import Dict +from typing import List + glossary_blueprint = Blueprint('glossary_blueprint', __name__) references_blueprint = Blueprint("references_blueprint", __name__) environments_blueprint = Blueprint("environments_blueprint", __name__) @@ -57,9 +61,10 @@ def get_file_from_python_search_path(pathname_suffix): return None -def get_blogs(user="genenetwork", repo_name="gn-docs"): +def get_blogs(user: str = "genenetwork", + repo_name: str = "gn-docs") -> dict: - blogs = {} + blogs: Dict[int, List] = {} github_url = f"https://api.github.com/repos/{user}/{repo_name}/git/trees/master?recursive=1" repo_tree = requests.get(github_url).json()["tree"] |