diff --git a/completion.py b/completion.py index 56f0f96ae..c98505a0e 100644 --- a/completion.py +++ b/completion.py @@ -22,7 +22,7 @@ def branches_from_devguide(devguide_dir: Path) -> list[str]: def get_completion( clones_dir: str, repo: str -) -> tuple[float, 'TranslatorsData', str, float]: +) -> tuple[float, 'TranslatorsData', str | None, float]: clone_path = Path(clones_dir, repo) for branch in branches_from_devguide(Path(clones_dir, 'devguide')) + [ 'master', diff --git a/metadata.html.jinja b/metadata.html.jinja index ba1bed664..f77b83fd0 100644 --- a/metadata.html.jinja +++ b/metadata.html.jinja @@ -7,7 +7,9 @@

Python Docs Translation Dashboard

- + @@ -15,6 +17,7 @@ + @@ -28,6 +31,9 @@ + {% endfor %} diff --git a/style.css b/style.css index 4bc9eb75e..10284701c 100644 --- a/style.css +++ b/style.css @@ -45,6 +45,18 @@ td[data-label="completion"] { width: 100%; line-height: 0; } +.switchpages{ + position:absolute; + top:10px; + right: 10px; + } + +@media screen and (max-width: 675px) { + .switchpages{ + all: unset; + } +} + @media screen and (max-width: 600px) { table, thead, tbody, th, td, tr { display: block; diff --git a/template.html.jinja b/template.html.jinja index 306c1e0f3..c92dc472e 100644 --- a/template.html.jinja +++ b/template.html.jinja @@ -8,7 +8,9 @@

Python Docs Translation Dashboard

- +
branch build warnings* lint failures30 days change
{% if project.completion %}{{ metadata[1] }}{% else %}{{ metadata[1] }}{% endif %} + +{{ "{:.2f}".format(project.change) }}% +
diff --git a/visitors.py b/visitors.py index 8876651b6..2c067ad68 100644 --- a/visitors.py +++ b/visitors.py @@ -14,7 +14,7 @@ def get_number_of_visitors(language: str, http: PoolManager) -> int: response = http.request( 'GET', f'https://plausible.io/docs.python.org/export?{params}', - retries=Retry(status_forcelist=(500,502)), + retries=Retry(status_forcelist=(500, 502)), ) info(f'visitors {response.status=} ({language=})') with (