Skip to content

Commit

Permalink
Fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
nlhkabu committed Sep 10, 2019
1 parent 67f27a2 commit 0faa55f
Show file tree
Hide file tree
Showing 14 changed files with 67 additions and 119 deletions.
17 changes: 3 additions & 14 deletions warehouse/templates/email/password-compromised-hibp/body.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,31 +32,20 @@ <h3>{% trans %}What?{% endtrans %}</h3>
<h3>{% trans %}What should I do?{% endtrans %}</h3>
<p>
{% trans trimmed reset_pw_url=request.route_url('accounts.request-password-reset', _host=request.registry.settings.get('warehouse.domain')), have_i_been_pwned_url='https://haveibeenpwned.com/' %}
To regain access to your account,
<a href="{{ reset_pw_url }}">reset your password</a>
on PyPI. We also recommend that you go to
<a href="{{ have_i_been_pwned_url }}">HaveIBeenPwned</a> and check your other
passwords and get yourself familiar with good password practices.
To regain access to your account, <a href="{{ reset_pw_url }}">reset your password</a> on PyPI. We also recommend that you go to <a href="{{ have_i_been_pwned_url }}">HaveIBeenPwned</a> and check your other passwords and get yourself familiar with good password practices.
{% endtrans %}
</p>


<h3>{% trans %}How do you know this?{% endtrans %}</h3>
<p>
{% trans trimmed have_i_been_pwned_url='https://haveibeenpwned.com/' %}
We use a free security service from
<a href="{{ have_i_been_pwned_url }}">HaveIBeenPwned</a>. When registering,
authenticating, or updating your password, we generate a SHA1 hash of your password
and use the first 5 characters of the hash to decide if the password is compromised.
The plaintext password is never stored by PyPI or sent to HaveIBeenPwned.
We use a free security service from <a href="{{ have_i_been_pwned_url }}">HaveIBeenPwned</a>. When registering, authenticating, or updating your password, we generate a SHA1 hash of your password and use the first 5 characters of the hash to decide if the password is compromised. The plaintext password is never stored by PyPI or sent to HaveIBeenPwned.
{% endtrans %}
</p>
<p>
{% trans trimmed faq_url=request.help_url(_anchor='compromised-password'), email_href='mailto:[email protected]', email_address='[email protected]' %}
For more information, see our
<a href="{{ faq_url }}">FAQ</a>. For help,
you can email <a href="{{ email_href }}">{{ email_address }}</a> to communicate with
the PyPI administrators.
For more information, see our <a href="{{ faq_url }}">FAQ</a>. For help, you can email <a href="{{ email_href }}">{{ email_address }}</a> to communicate with the PyPI administrators.
{% endtrans %}
</p>
{% endblock %}
3 changes: 1 addition & 2 deletions warehouse/templates/email/password-compromised/body.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ <h3>{% trans %}What?{% endtrans %}</h3>
<h3>{% trans %}What should I do?{% endtrans %}</h3>
<p>
{% trans trimmed href=request.route_url('accounts.request-password-reset', _host=request.registry.settings.get('warehouse.domain')) %}
To regain access to your account,
<a href="{{ href }}">reset your password</a> on PyPI.
To regain access to your account, <a href="{{ href }}">reset your password</a> on PyPI.
{% endtrans %}
</p>

Expand Down
10 changes: 2 additions & 8 deletions warehouse/templates/includes/accounts/profile-actions.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@
<h3 class="sidebar-section__title">{% trans %}Statistics{% endtrans %}</h3>
<p>
{% trans trimmed libs_io_href='https://libraries.io/', title=gettext('External link'), gbq_href='https://packaging.python.org/guides/analyzing-pypi-package-downloads/' %}
View statistics for your projects via
<a href="{{ libs_io_href }}" title="{{ title }}" target="_blank" rel="noopener">Libraries.io</a>,
or by using
<a href="{{ gbq_href }}" target="_blank" rel="noopener">Google BigQuery</a>
View statistics for your projects via <a href="{{ libs_io_href }}" title="{{ title }}" target="_blank" rel="noopener">Libraries.io</a>, or by using <a href="{{ gbq_href }}" target="_blank" rel="noopener">Google BigQuery</a>
{% endtrans %}
</p>
</div>
Expand All @@ -31,10 +28,7 @@ <h3 class="sidebar-section__title">{% trans %}Statistics{% endtrans %}</h3>
<h3 class="sidebar-section__title">{% trans %}Statistics{% endtrans %}</h3>
<p>
{% trans trimmed username=user.username, libs_io_href='https://libraries.io/', title=gettext('External link'), gbq_href='https://packaging.python.org/guides/analyzing-pypi-package-downloads/' %}
View statistics for {{ username }}'s projects via
<a href="{{ libs_io_href }}" title="{{ title }}" target="_blank" rel="noopener">Libraries.io</a>,
or by using
<a href="{{ gbq_href }}" target="_blank" rel="noopener">Google BigQuery</a>
View statistics for {{ username }}'s projects via <a href="{{ libs_io_href }}" title="{{ title }}" target="_blank" rel="noopener">Libraries.io</a>, or by using <a href="{{ gbq_href }}" target="_blank" rel="noopener">Google BigQuery</a>
{% endtrans %}
</p>
</div>
Expand Down
4 changes: 1 addition & 3 deletions warehouse/templates/includes/accounts/profile-callout.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@
{% if user.id == request.user.id %}
<p>
{% trans trimmed href='https://packaging.python.org/', title=gettext('External link') %}
You have not uploaded any projects to PyPI, yet.
To learn how to get started, visit the
<a href="{{ href }}" title="{{ title }}" target="_blank" rel="noopener">Python Packaging User Guide</a>
You have not uploaded any projects to PyPI, yet. To learn how to get started, visit the <a href="{{ href }}" title="{{ title }}" target="_blank" rel="noopener">Python Packaging User Guide</a>
{% endtrans %}
</p>
{% else %}
Expand Down
2 changes: 1 addition & 1 deletion warehouse/templates/includes/hash-modal.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<div class="modal__body">
<h3 class="modal__title">
{% trans trimmed href='https://pip.pypa.io/en/stable/reference/pip_install/#hash-checking-mode', title=gettext('External link'), filename=file.filename %}
<a href="{{ href }}" title="{{ title }}" target="_blank" rel="noopener">Hashes</a> for {{ filename }}
<a href="{{ href }}" title="{{ title }}" target="_blank" rel="noopener">Hashes</a> for {{ filename }}
{% endtrans %}
</h3>
<table class="table table--hashes">
Expand Down
5 changes: 1 addition & 4 deletions warehouse/templates/includes/packaging/project-data.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,7 @@ <h3 class="sidebar-section__title">{% trans %}Statistics{% endtrans %}</h3>
{% endif %}
<p>
{% trans trimmed libs_io_href='https://libraries.io/pypi/{project_name}'.format(project_name=release.project.name) title=gettext('External link') gbq_href='https://packaging.python.org/guides/analyzing-pypi-package-downloads/' %}
View statistics for this project via
<a href="{{ libs_io_href }}" title="{{ title }}" target="_blank" rel="noopener">Libraries.io</a>,
or by using
<a href="{{ gbq_href }}" target="_blank" rel="noopener">Google BigQuery</a>
View statistics for this project via <a href="{{ libs_io_href }}" title="{{ title }}" target="_blank" rel="noopener">Libraries.io</a>, or by using <a href="{{ gbq_href }}" target="_blank" rel="noopener">Google BigQuery</a>
{% endtrans %}
</p>
</div>
Expand Down
3 changes: 1 addition & 2 deletions warehouse/templates/includes/session-notifications.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@
<div class="notification-bar notification-bar--dismissable" data-controller="notification" data-target="notification.notification">
<span class="notification-bar__message">
{% trans trimmed href=request.route_path('manage.account', _anchor="two-factor") %}
Two factor authentication is available,
<a href="{{ href }}">enable it now for your account.</a>
Two factor authentication is available, <a href="{{ href }}">enable it now for your account.</a>
{% endtrans %}
</span>
<button type="button" title="Dismiss this notification" data-target="notification.dismissButton" data-action="click->notification#dismiss" class="notification-bar__dismiss" aria-label="close"><i class="fa fa-times" aria-hidden="true"></i></button>
Expand Down
3 changes: 1 addition & 2 deletions warehouse/templates/manage/account.html
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,7 @@
<ul id="webauthn-errors" class="form-errors form-errors--full-width">
<li id="webauthn-browser-support" class="hidden margin-top--large">
{% trans trimmed href='https://developer.mozilla.org/en-US/docs/Web/API/PublicKeyCredential#Browser_compatibility', title=gettext('External link') %}
<a href="{{ href }}" title="{{ title }}" target="_blank" rel="noopener">Upgrade your browser</a>
to set up two factor authentication with a security device (e.g. USB key)
<a href="{{ href }}" title="{{ title }}" target="_blank" rel="noopener">Upgrade your browser</a> to set up two factor authentication with a security device (e.g. USB key)
{% endtrans %}
</li>
</ul>
Expand Down
3 changes: 1 addition & 2 deletions warehouse/templates/manage/account/totp-provision.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@
<h1 class="page-title page-title--wsubtitle heading-wsubtitle__heading">{{ title }}</h1>
<p class="heading-wsubtitle__subtitle">
{% trans trimmed href='https://en.wikipedia.org/wiki/Time-based_One-time_Password_algorithm', title=gettext('External link') %}
PyPI supports any application that follows the
<a href="{{ href }}" title="{{ title }}" target="_blank" rel="noopener"><abbr title="time-based one-time password">TOTP</abbr> standard</a>.
PyPI supports any application that follows the <a href="{{ href }}" title="{{ title }}" target="_blank" rel="noopener"><abbr title="time-based one-time password">TOTP</abbr> standard</a>.
{% endtrans %}
<br>
{% trans trimmed href=request.route_path('help', _anchor='totp') %}
Expand Down
7 changes: 2 additions & 5 deletions warehouse/templates/manage/account/webauthn-provision.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ <h1 class="page-title page-title--wsubtitle heading-wsubtitle__heading">{{ title
<ul id="webauthn-errors" class="form-errors margin-top--large">
<li id="webauthn-browser-support" class="hidden">
{% trans trimmed href='https://developer.mozilla.org/en-US/docs/Web/API/PublicKeyCredential#Browser_compatibility', title=gettext('External link') %}
<a href="{{ href }}" title="{{ title }}" target="_blank" rel="noopener">Upgrade your browser</a> to set up two factor authentication with a security device (e.g. USB key)
<a href="{{ href }}" title="{{ title }}" target="_blank" rel="noopener">Upgrade your browser</a> to set up two factor authentication with a security device (e.g. USB key)
{% endtrans %}
</li>
</ul>
Expand All @@ -71,10 +71,7 @@ <h1 class="page-title page-title--wsubtitle heading-wsubtitle__heading">{{ title
<div class="callout-block">
<p>
{% trans trimmed title=gettext('External link'), fido_href='https://fidoalliance.org/specifications/download/', mozilla_href='https://developer.mozilla.org/en-US/docs/Web/API/PublicKeyCredential#Browser_compatibility' %}
<strong>Not working?</strong> Check you're using a device that follows the
<a href="{{ fido_href }}" title="{{ title }}" target="_blank" rel="noopener">FIDO specification</a>
and a
<a href="{{ mozilla_href }}" title="{{ title }}" target="_blank" rel="noopener">compatible browser</a>.
<strong>Not working?</strong> Check you're using a device that follows the <a href="{{ fido_href }}" title="{{ title }}" target="_blank" rel="noopener">FIDO specification</a> and a <a href="{{ mozilla_href }}" title="{{ title }}" target="_blank" rel="noopener">compatible browser</a>.
{% endtrans %}
</p>
<p>{% trans %}Note that some older USB keys do not adhere to the FIDO standard and will not work with PyPI.{% endtrans %}</p>
Expand Down
13 changes: 4 additions & 9 deletions warehouse/templates/manage/settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,10 @@ <h2>{% trans %}Project settings{% endtrans %}</h2>
<h3>{% trans %}Project description and sidebar{% endtrans %}</h3>
<p>
{% trans trimmed project_name=project.name, setup_args_href='https://packaging.python.org/tutorials/distributing-packages/#setup-args', twine_docs_href='https://twine.readthedocs.io/en/latest/', distribution_href='https://packaging.python.org/tutorials/distributing-packages/' %}
To set the '{{ project_name }}' description, author, links,
classifiers, and other details for your next release, use
the <a href="{{ setup_args_href }}" rel="noopener" target="_blank"><code>setup()</code>
arguments in your <code>setup.py</code> file</a>. Updating these
fields will not change the metadata for past
releases. Additionally, you <strong>must</strong> use
<a href="{{ twine_docs_href }}" rel="noopener" target="_blank">Twine</a>
to upload your files in order to get full support for these fields. See
<a href="{{ distribution_href }}" rel="noopener" target="_blank">the Python Packaging User Guide</a> for more help.
To set the '{{ project_name }}' description, author, links, classifiers, and other details for your next release, use the <a href="{{ setup_args_href }}" rel="noopener" target="_blank"><code>setup()</code> arguments in your <code>setup.py</code> file</a>.
Updating these fields will not change the metadata for past releases.
Additionally, you <strong>must</strong> use <a href="{{ twine_docs_href }}" rel="noopener" target="_blank">Twine</a> to upload your files in order to get full support for these fields.
See <a href="{{ distribution_href }}" rel="noopener" target="_blank">the Python Packaging User Guide</a> for more help.
{% endtrans %}
</p>
<button type="button" title="{% trans %}Dismiss{% endtrans %}" data-action="click->dismissable#dismiss" class="callout-block__dismiss" aria-label="close"><i class="fa fa-times" aria-hidden="true"></i></button>
Expand Down
6 changes: 2 additions & 4 deletions warehouse/templates/pages/classifiers.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,8 @@ <h1 class="page-title">{% trans %}Classifiers{% endtrans %}</h1>
<p>{% trans %}These standardized classifiers can then be used by community members to find projects based on their desired criteria.{% endtrans %}</p>
<p>
{% trans trimmed ppug_href='https://packaging.python.org/tutorials/distributing-packages/#classifiers', pep301_href='https://www.python.org/dev/peps/pep-0301/#distutils-trove-classification', title=gettext('External link') %}
Instructions for how to add trove classifiers to a project can be found on the
<a href="{{ ppug_href }}" title="{{ title }}" target="_blank" rel="noopener">Python Packaging User Guide</a>.
To read the original classifier specification, refer to
<a href="{{ pep301_href }}" title="{{ title }}" target="_blank" rel="noopener"><abbr title="Python enhancement proposal">PEP</abbr> 301</a>.
Instructions for how to add trove classifiers to a project can be found on the <a href="{{ ppug_href }}" title="{{ title }}" target="_blank" rel="noopener">Python Packaging User Guide</a>.
To read the original classifier specification, refer to <a href="{{ pep301_href }}" title="{{ title }}" target="_blank" rel="noopener"><abbr title="Python enhancement proposal">PEP</abbr> 301</a>.
{% endtrans %}
</p>

Expand Down
Loading

0 comments on commit 0faa55f

Please sign in to comment.