Skip to content

Commit c0a6d7d

Browse files
Stan's Suggestions
2 parents e44b0ff + 3b20e50 commit c0a6d7d

File tree

5 files changed

+24
-4
lines changed

5 files changed

+24
-4
lines changed

completion.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def branches_from_devguide(devguide_dir: Path) -> list[str]:
2222

2323
def get_completion(
2424
clones_dir: str, repo: str
25-
) -> tuple[float, 'TranslatorsData', str, float]:
25+
) -> tuple[float, 'TranslatorsData', str | None, float]:
2626
clone_path = Path(clones_dir, repo)
2727
for branch in branches_from_devguide(Path(clones_dir, 'devguide')) + [
2828
'master',

metadata.html.jinja

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,17 @@
77
</head>
88
<body>
99
<h1>Python Docs Translation Dashboard</h1>
10-
<nav><p><a href="index.html" target="_self">main</a> | meta</p></nav>
10+
<nav class="switchpages">
11+
<a href="index.html" target="_self">main</a> | meta
12+
</nav>
1113
<table>
1214
<thead>
1315
<tr>
1416
<th>language</th>
1517
<th>branch</th>
1618
<th>build warnings*</th>
1719
<th>lint failures</th>
20+
<th>30 days change</th>
1821
</tr>
1922
</thead>
2023
<tbody>
@@ -28,6 +31,9 @@
2831
<td data-label="lint">
2932
{% if project.completion %}<a href="warnings-lint-{{ project.language.code }}.txt">{{ metadata[1] }}</a>{% else %}{{ metadata[1] }}{% endif %}
3033
</td>
34+
<td data-label="change">
35+
+{{ "{:.2f}".format(project.change) }}%
36+
</td>
3137
</tr>
3238
{% endfor %}
3339
</tbody>

style.css

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,18 @@ td[data-label="completion"] {
4545
width: 100%;
4646
line-height: 0;
4747
}
48+
.switchpages{
49+
position:absolute;
50+
top:10px;
51+
right: 10px;
52+
}
53+
54+
@media screen and (max-width: 675px) {
55+
.switchpages{
56+
all: unset;
57+
}
58+
}
59+
4860
@media screen and (max-width: 600px) {
4961
table, thead, tbody, th, td, tr {
5062
display: block;

template.html.jinja

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
</head>
99
<body>
1010
<h1>Python Docs Translation Dashboard</h1>
11-
<nav><p>main | <a href="metadata.html" target="_self">meta</a></p></nav>
11+
<nav class="switchpages">
12+
main | <a href="metadata.html" target="_self">meta</a>
13+
</nav>
1214
<table>
1315
<thead>
1416
<tr>

visitors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def get_number_of_visitors(language: str, http: PoolManager) -> int:
1414
response = http.request(
1515
'GET',
1616
f'https://plausible.io/docs.python.org/export?{params}',
17-
retries=Retry(status_forcelist=(500,502)),
17+
retries=Retry(status_forcelist=(500, 502)),
1818
)
1919
info(f'visitors {response.status=} ({language=})')
2020
with (

0 commit comments

Comments
 (0)