File tree Expand file tree Collapse file tree 3 files changed +5
-16
lines changed
warehouse/templates/api/simple Expand file tree Collapse file tree 3 files changed +5
-16
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,8 @@ exclude_lines = [
33
33
indent = 2
34
34
profile = " jinja"
35
35
use_gitignore = true
36
+ # The Simple API templates have structures that are relied upon.
37
+ extend_exclude = " warehouse/templates/api/simple/*"
36
38
# TODO: Evaluate which `img` tags can get height/width attributes and remove H006.
37
39
# H006: <img> tag should have `height` and `width` attributes.
38
40
# TODO: Convert single quotes to double quotes and remove T002 from ignore.
Original file line number Diff line number Diff line change 1
1
{# SPDX-License-Identifier: Apache-2.0 -#}
2
2
<!DOCTYPE html>
3
- {# djlint:off H030,H031 #}
4
3
< html lang ="en ">
5
- {# djlint:on #}
6
4
< head >
7
5
< meta name ="pypi:repository-version " content ="{{ meta['api-version'] }} ">
8
6
{% for alt_repo in alternate_locations %}< meta name ="pypi:alternate-locations " content ="{{ alt_repo }} "> {% endfor %}
11
9
< body >
12
10
< h1 > Links for {{ name }}</ h1 >
13
11
{% for file in files -%}
14
- < a href ="{{ file.url }}#sha256={{ file.hashes.sha256 }} "
15
- {% if file.get( 'requires-python') %}data-requires-python="{{ file['requires-python'] }} "{% endif %}
16
- {% if file.yanked %}data-yanked ="{% if file.yanked is string %}{{ file.yanked }}{% endif %}
17
- "
18
- {% endif %}
19
- {% if file[ 'core-metadata'] %}data-dist-info-metadata="sha256={{ file['core-metadata']['sha256'] }} " data-core-metadata ="sha256={{ file['core-metadata']['sha256'] }} "{% endif %}
20
- {# djlint:off #}
21
- {# TODO: Disabled is due to some clients not parsing **HTML**. See https: //github.com/pypi/warehouse/issues/18275 #}
22
- {% if file.get('provenance') %}data-provenance="{{ file['provenance'] }} "{% endif %} > {{ file.filename }}</ a > < br />
23
- {# djlint:on #}
12
+ < a href ="{{ file.url }}#sha256={{ file.hashes.sha256 }} " {% if file.get( 'requires-python') %}data-requires-python="{{ file['requires-python'] }} " {% endif %}{% if file.yanked %}data-yanked ="{% if file.yanked is string %}{{ file.yanked }}{% endif %} " {% endif %}{% if file[ 'core-metadata'] %}data-dist-info-metadata="sha256={{ file['core-metadata']['sha256'] }} " data-core-metadata ="sha256={{ file['core-metadata']['sha256'] }} "{% endif %}{% if file.get( 'provenance') %} data-provenance="{{ file['provenance'] }} "{% endif %} > {{ file.filename }}</ a > < br />
24
13
{% endfor -%}
25
14
</ body >
26
15
</ html >
Original file line number Diff line number Diff line change 1
1
{# SPDX-License-Identifier: Apache-2.0 -#}
2
2
<!DOCTYPE html>
3
- {# djlint:off H030,H031 #}
4
3
< html lang ="en ">
5
- {# djlint:on #}
6
4
< head >
7
- < meta name ="pypi:repository-version " content ="{{ meta['api-version'] }} ">
5
+ < meta name ="pypi:repository-version " content ="{{meta['api-version'] }} ">
8
6
< title > Simple index</ title >
9
7
</ head >
10
8
< body >
11
9
{% for project in projects -%}
12
- < a href ="{{ request.route_path('api.simple.detail', name=project.name|canonicalize_name) }} "> {{ project.name }}</ a >
10
+ < a href ="{{ request.route_path('api.simple.detail', name=project.name|canonicalize_name) }} "> {{ project.name }}</ a >
13
11
{% endfor -%}
14
12
</ body >
15
13
</ html >
You can’t perform that action at this time.
0 commit comments