From 220be219988e4a9881305bcc7160c4037ddf6df1 Mon Sep 17 00:00:00 2001 From: Lars Eggert Date: Wed, 7 Dec 2022 23:10:35 +0200 Subject: [PATCH] chore: Use codespell to fix typos in code. (#4797) * chore: Use codespell to fix typos in code. Second part of replacement of #4651 @rjsparks, I probably need to revert some things here, and I also still need to add that new migration - how do I do that? * Revert migrations * Migrate "Whitelisted" to "Allowlisted" * TEST_COVERAGE_MASTER_FILE -> TEST_COVERAGE_MAIN_FILE * Fix permissions * Add suggestions from @jennifer-richards --- ietf/api/views.py | 2 +- ietf/dbtemplate/fixtures/nomcom_templates.xml | 2 +- .../templates/dbtemplate/template_edit.html | 4 ++-- .../templates/dbtemplate/template_show.html | 4 ++-- ietf/doc/tests.py | 2 +- ietf/group/models.py | 10 ++++----- ietf/group/tests_info.py | 4 ++-- ietf/ietfauth/forms.py | 6 ++--- ietf/ietfauth/tests.py | 10 ++++----- ietf/ietfauth/urls.py | 2 +- ietf/ietfauth/views.py | 18 +++++++-------- ietf/ipr/tests.py | 18 +++++++-------- ietf/mailinglists/admin.py | 6 ++--- .../migrations/0003_allowlisted.py | 22 +++++++++++++++++++ ietf/mailinglists/models.py | 6 ++--- ietf/mailinglists/resources.py | 10 ++++----- ietf/name/fixtures/names.json | 8 +++---- ietf/nomcom/forms.py | 4 ++-- .../commands/deactivate_email_addresses.py | 2 +- ietf/secr/templates/telechat/group.html | 4 ++-- ietf/settings.py | 4 ++-- ietf/static/js/document_relations.js | 2 +- ietf/stats/views.py | 2 +- ietf/submit/forms.py | 2 +- ietf/sync/rfceditor.py | 2 +- ietf/templates/base/menu_user.html | 4 ++-- .../doc/mail/resurrect_completed_email.txt | 2 +- ...hitelist_form.html => allowlist_form.html} | 14 ++++++------ .../templates/meeting/add_session_drafts.html | 2 +- .../nomcom/view_feedback_pending.html | 2 +- ietf/utils/decorators.py | 2 +- ietf/utils/draft.py | 6 ++--- ietf/utils/mail.py | 2 +- .../management/commands/coverage_changes.py | 12 +++++----- ietf/utils/management/commands/tests.py | 12 +++++----- .../commands/update_external_command_info.py | 2 +- ietf/utils/test_data.py | 2 +- ietf/utils/test_runner.py | 2 +- 38 files changed, 120 insertions(+), 100 deletions(-) create mode 100644 ietf/mailinglists/migrations/0003_allowlisted.py rename ietf/templates/ietfauth/{whitelist_form.html => allowlist_form.html} (91%) diff --git a/ietf/api/views.py b/ietf/api/views.py index a6a51f667..e5fc3bac5 100644 --- a/ietf/api/views.py +++ b/ietf/api/views.py @@ -80,7 +80,7 @@ class PersonalInformationExportView(DetailView, JsonExportMixin): person = get_object_or_404(self.model, user=request.user) expand = ['searchrule', 'documentauthor', 'ad_document_set', 'ad_dochistory_set', 'docevent', 'ballotpositiondocevent', 'deletedevent', 'email_set', 'groupevent', 'role', 'rolehistory', 'iprdisclosurebase', - 'iprevent', 'liaisonstatementevent', 'whitelisted', 'schedule', 'constraint', 'schedulingevent', 'message', + 'iprevent', 'liaisonstatementevent', 'allowlisted', 'schedule', 'constraint', 'schedulingevent', 'message', 'sendqueue', 'nominee', 'topicfeedbacklastseen', 'alias', 'email', 'apikeys', 'personevent', 'reviewersettings', 'reviewsecretarysettings', 'unavailableperiod', 'reviewwish', 'nextreviewerinteam', 'reviewrequest', 'meetingregistration', 'submissionevent', 'preapproval', diff --git a/ietf/dbtemplate/fixtures/nomcom_templates.xml b/ietf/dbtemplate/fixtures/nomcom_templates.xml index dbaa7df3e..abf0cb58f 100644 --- a/ietf/dbtemplate/fixtures/nomcom_templates.xml +++ b/ietf/dbtemplate/fixtures/nomcom_templates.xml @@ -166,7 +166,7 @@ Thank you, Thank you for accepting your nomination for the position of $position. Please remember to complete and return the questionnaire for this position at your earliest opportunity. -The questionaire is repeated below for your convenience. +The questionnaire is repeated below for your convenience. -------- diff --git a/ietf/dbtemplate/templates/dbtemplate/template_edit.html b/ietf/dbtemplate/templates/dbtemplate/template_edit.html index f27ab9c83..d4f0c755f 100644 --- a/ietf/dbtemplate/templates/dbtemplate/template_edit.html +++ b/ietf/dbtemplate/templates/dbtemplate/template_edit.html @@ -15,7 +15,7 @@
{{ template.type.name }} {% if template.type.slug == "rst" %}

This template uses the syntax of reStructuredText. Get a quick reference at http://docutils.sourceforge.net/docs/user/rst/quickref.html.

-

You can do variable interpolation with $varialbe if the template allows any variable.

+

You can do variable interpolation with $variable if the template allows any variable.

{% endif %} {% if template.type.slug == "django" %}

This template uses the syntax of the default django template framework. Get more info at https://docs.djangoproject.com/en/dev/topics/templates/.

@@ -43,4 +43,4 @@ -{% endblock %} +{% endblock %} \ No newline at end of file diff --git a/ietf/dbtemplate/templates/dbtemplate/template_show.html b/ietf/dbtemplate/templates/dbtemplate/template_show.html index a3a77ed45..527c9dedf 100644 --- a/ietf/dbtemplate/templates/dbtemplate/template_show.html +++ b/ietf/dbtemplate/templates/dbtemplate/template_show.html @@ -15,7 +15,7 @@
{{ template.type.name }} {% if template.type.slug == "rst" %}

This template uses the syntax of reStructuredText. Get a quick reference at http://docutils.sourceforge.net/docs/user/rst/quickref.html.

-

You can do variable interpolation with $varialbe if the template allows any variable.

+

You can do variable interpolation with $variable if the template allows any variable.

{% endif %} {% if template.type.slug == "django" %}

This template uses the syntax of the default django template framework. Get more info at https://docs.djangoproject.com/en/dev/topics/templates/.

@@ -37,4 +37,4 @@
{{ template.content|escape }}
-{% endblock %} +{% endblock %} \ No newline at end of file diff --git a/ietf/doc/tests.py b/ietf/doc/tests.py index 751625e59..36431cb02 100644 --- a/ietf/doc/tests.py +++ b/ietf/doc/tests.py @@ -489,7 +489,7 @@ Table of Contents 1. Introduction This document describes how to make the Martian networks work. The - methods used in Earth do not directly translate to the efficent + methods used in Earth do not directly translate to the efficient networks on Mars, as the topographical differences caused by planets. For example the avian carriers, cannot be used in the Mars, thus RFC1149 ([RFC1149]) cannot be used in Mars. diff --git a/ietf/group/models.py b/ietf/group/models.py index c4c1673ac..112522f2c 100644 --- a/ietf/group/models.py +++ b/ietf/group/models.py @@ -133,15 +133,15 @@ class Group(GroupInfo): role_names = [role_names] return user.is_authenticated and self.role_set.filter(name__in=role_names, person__user=user).exists() - def is_decendant_of(self, sought_parent): + def is_descendant_of(self, sought_parent): parent = self.parent - decendants = [ self, ] - while (parent != None) and (parent not in decendants): - decendants = [ parent ] + decendants + descendants = [ self, ] + while (parent != None) and (parent not in descendants): + descendants = [ parent ] + descendants if parent.acronym == sought_parent: return True parent = parent.parent - log.assertion('parent not in decendants') + log.assertion('parent not in descendants') return False def get_chair(self): diff --git a/ietf/group/tests_info.py b/ietf/group/tests_info.py index 71763eae4..98af69ba0 100644 --- a/ietf/group/tests_info.py +++ b/ietf/group/tests_info.py @@ -1937,12 +1937,12 @@ class GroupParentLoopTests(TestCase): import signal def timeout_handler(signum, frame): - raise Exception("Infinite loop in parent links is not handeled properly.") + raise Exception("Infinite loop in parent links is not handled properly.") signal.signal(signal.SIGALRM, timeout_handler) signal.alarm(1) # One second try: - test2.is_decendant_of("ietf") + test2.is_descendant_of("ietf") except AssertionError: pass except Exception: diff --git a/ietf/ietfauth/forms.py b/ietf/ietfauth/forms.py index 7a609c623..dab5ce374 100644 --- a/ietf/ietfauth/forms.py +++ b/ietf/ietfauth/forms.py @@ -18,7 +18,7 @@ from django_password_strength.widgets import PasswordStrengthInput, PasswordConf import debug # pyflakes:ignore from ietf.person.models import Person, Email -from ietf.mailinglists.models import Whitelisted +from ietf.mailinglists.models import Allowlisted from ietf.utils.text import isascii class RegistrationForm(forms.Form): @@ -203,9 +203,9 @@ class ResetPasswordForm(forms.Form): class TestEmailForm(forms.Form): email = forms.EmailField(required=False) -class WhitelistForm(forms.ModelForm): +class AllowlistForm(forms.ModelForm): class Meta: - model = Whitelisted + model = Allowlisted exclude = ['by', 'time' ] diff --git a/ietf/ietfauth/tests.py b/ietf/ietfauth/tests.py index 8e4d14982..9fd75d06d 100644 --- a/ietf/ietfauth/tests.py +++ b/ietf/ietfauth/tests.py @@ -194,7 +194,7 @@ class IetfAuthTests(TestCase): self.assertTrue(self.username_in_htpasswd_file(email)) - def test_create_whitelisted_account(self): + def test_create_allowlisted_account(self): email = "new-account@example.com" # add allowlist entry @@ -202,13 +202,13 @@ class IetfAuthTests(TestCase): self.assertEqual(r.status_code, 302) self.assertEqual(urlsplit(r["Location"])[2], urlreverse(ietf.ietfauth.views.profile)) - r = self.client.get(urlreverse(ietf.ietfauth.views.add_account_whitelist)) + r = self.client.get(urlreverse(ietf.ietfauth.views.add_account_allowlist)) self.assertEqual(r.status_code, 200) - self.assertContains(r, "Add a whitelist entry") + self.assertContains(r, "Add an allowlist entry") - r = self.client.post(urlreverse(ietf.ietfauth.views.add_account_whitelist), {"email": email}) + r = self.client.post(urlreverse(ietf.ietfauth.views.add_account_allowlist), {"email": email}) self.assertEqual(r.status_code, 200) - self.assertContains(r, "Whitelist entry creation successful") + self.assertContains(r, "Allowlist entry creation successful") # log out r = self.client.get(urlreverse('django.contrib.auth.views.logout')) diff --git a/ietf/ietfauth/urls.py b/ietf/ietfauth/urls.py index 12c749fbe..56daae053 100644 --- a/ietf/ietfauth/urls.py +++ b/ietf/ietfauth/urls.py @@ -24,5 +24,5 @@ urlpatterns = [ url(r'^review/$', views.review_overview), url(r'^testemail/$', views.test_email), url(r'^username/$', views.change_username), - url(r'^whitelist/add/?$', views.add_account_whitelist), + url(r'^allowlist/add/?$', views.add_account_allowlist), ] diff --git a/ietf/ietfauth/views.py b/ietf/ietfauth/views.py index f9db86d76..f89bc0149 100644 --- a/ietf/ietfauth/views.py +++ b/ietf/ietfauth/views.py @@ -62,13 +62,11 @@ import debug # pyflakes:ignore from ietf.group.models import Role, Group from ietf.ietfauth.forms import ( RegistrationForm, PasswordForm, ResetPasswordForm, TestEmailForm, - WhitelistForm, ChangePasswordForm, get_person_form, RoleEmailForm, + AllowlistForm, ChangePasswordForm, get_person_form, RoleEmailForm, NewEmailForm, ChangeUsernameForm, PersonPasswordForm) from ietf.ietfauth.htpasswd import update_htpasswd_file from ietf.ietfauth.utils import role_required, has_role -from ietf.mailinglists.models import Whitelisted -# needed if we revert to higher barrier for account creation -#from ietf.mailinglists.models import Subscribed, Whitelisted +from ietf.mailinglists.models import Allowlisted from ietf.name.models import ExtResourceName from ietf.nomcom.models import NomCom from ietf.person.models import Person, Email, Alias, PersonalApiKey, PERSON_API_KEY_VALUES @@ -128,7 +126,7 @@ def create_account(request): # The following is what to revert to should that lowered barrier prove problematic # existing = Subscribed.objects.filter(email=to_email).first() - # ok_to_create = ( Whitelisted.objects.filter(email=to_email).exists() + # ok_to_create = ( Allowlisted.objects.filter(email=to_email).exists() # or existing and (existing.time + TimeDelta(seconds=settings.LIST_ACCOUNT_DELAY)) < DateTime.now() ) # if ok_to_create: # send_account_creation_email(request, to_email) @@ -522,19 +520,19 @@ def test_email(request): return r @role_required('Secretariat') -def add_account_whitelist(request): +def add_account_allowlist(request): success = False if request.method == 'POST': - form = WhitelistForm(request.POST) + form = AllowlistForm(request.POST) if form.is_valid(): email = form.cleaned_data['email'] - entry = Whitelisted(email=email, by=request.user.person) + entry = Allowlisted(email=email, by=request.user.person) entry.save() success = True else: - form = WhitelistForm() + form = AllowlistForm() - return render(request, 'ietfauth/whitelist_form.html', { + return render(request, 'ietfauth/allowlist_form.html', { 'form': form, 'success': success, }) diff --git a/ietf/ipr/tests.py b/ietf/ipr/tests.py index a190306b1..fadbb4290 100644 --- a/ietf/ipr/tests.py +++ b/ietf/ipr/tests.py @@ -134,7 +134,7 @@ class IprTests(TestCase): def test_search(self): WgDraftFactory() # The test matching the prefix "draft" needs more than one thing to find draft = WgDraftFactory() - ipr = HolderIprDisclosureFactory(docs=[draft,],patent_info='Number: US12345\nTitle: A method of transfering bits\nInventor: A. Nonymous\nDate: 2000-01-01') + ipr = HolderIprDisclosureFactory(docs=[draft,],patent_info='Number: US12345\nTitle: A method of transferring bits\nInventor: A. Nonymous\nDate: 2000-01-01') url = urlreverse("ietf.ipr.views.search") @@ -262,7 +262,7 @@ class IprTests(TestCase): "iprdocrel_set-1-document": DocAlias.objects.filter(name__startswith="rfc").first().pk, "patent_number": "SE12345678901", "patent_inventor": "A. Nonymous", - "patent_title": "A method of transfering bits", + "patent_title": "A method of transferring bits", "patent_date": "2000-01-01", "has_patent_pending": False, "licensing": "royalty-free", @@ -277,7 +277,7 @@ class IprTests(TestCase): ipr = iprs[0] self.assertEqual(ipr.holder_legal_name, "Test Legal") self.assertEqual(ipr.state.slug, 'pending') - for item in ['SE12345678901','A method of transfering bits','2000-01-01']: + for item in ['SE12345678901','A method of transferring bits','2000-01-01']: self.assertIn(item, ipr.get_child().patent_info) self.assertTrue(isinstance(ipr.get_child(),HolderIprDisclosure)) self.assertEqual(len(outbox),1) @@ -318,7 +318,7 @@ class IprTests(TestCase): "iprdocrel_set-1-document": DocAlias.objects.filter(name__startswith="rfc").first().pk, "patent_number": "SE12345678901", "patent_inventor": "A. Nonymous", - "patent_title": "A method of transfering bits", + "patent_title": "A method of transferring bits", "patent_date": "2000-01-01", "has_patent_pending": False, "licensing": "royalty-free", @@ -332,7 +332,7 @@ class IprTests(TestCase): ipr = iprs[0] self.assertEqual(ipr.holder_legal_name, "Test Legal") self.assertEqual(ipr.state.slug, "pending") - for item in ['SE12345678901','A method of transfering bits','2000-01-01' ]: + for item in ['SE12345678901','A method of transferring bits','2000-01-01' ]: self.assertIn(item, ipr.get_child().patent_info) self.assertTrue(isinstance(ipr.get_child(),ThirdPartyIprDisclosure)) self.assertEqual(len(outbox),1) @@ -368,7 +368,7 @@ class IprTests(TestCase): "patent_date": "2000-01-01", "patent_inventor": "A. Nonymous", "patent_number": "SE12345678901", - "patent_title": "A method of transfering bits", + "patent_title": "A method of transferring bits", "submitter_email": "test@holder.com", "submitter_name": "Test Holder", "updates": [], @@ -414,7 +414,7 @@ class IprTests(TestCase): "iprdocrel_set-1-document": DocAlias.objects.filter(name__startswith="rfc").first().pk, "patent_number": "SE12345678901", "patent_inventor": "A. Nonymous", - "patent_title": "A method of transfering bits", + "patent_title": "A method of transferring bits", "patent_date": "2000-01-01", "has_patent_pending": False, "licensing": "royalty-free", @@ -450,7 +450,7 @@ class IprTests(TestCase): "iprdocrel_set-0-revisions": '00', "patent_number": "SE12345678901", "patent_inventor": "A. Nonymous", - "patent_title": "A method of transfering bits", + "patent_title": "A method of transferring bits", "patent_date": "2000-01-01", "has_patent_pending": False, "licensing": "royalty-free", @@ -753,4 +753,4 @@ Subject: test removed_docevent = doc.docevent_set.filter(type='removed_related_ipr').first() self.assertIn(ipr.title, removed_docevent.desc, 'IprDisclosure title does not appear in DocEvent desc when removed') - \ No newline at end of file + diff --git a/ietf/mailinglists/admin.py b/ietf/mailinglists/admin.py index aaa086823..90efaf9c9 100644 --- a/ietf/mailinglists/admin.py +++ b/ietf/mailinglists/admin.py @@ -2,7 +2,7 @@ from django.contrib import admin -from ietf.mailinglists.models import List, Subscribed, Whitelisted +from ietf.mailinglists.models import List, Subscribed, Allowlisted class ListAdmin(admin.ModelAdmin): @@ -18,6 +18,6 @@ class SubscribedAdmin(admin.ModelAdmin): admin.site.register(Subscribed, SubscribedAdmin) -class WhitelistedAdmin(admin.ModelAdmin): +class AllowlistedAdmin(admin.ModelAdmin): list_display = ('id', 'time', 'email', 'by') -admin.site.register(Whitelisted, WhitelistedAdmin) +admin.site.register(Allowlisted, AllowlistedAdmin) diff --git a/ietf/mailinglists/migrations/0003_allowlisted.py b/ietf/mailinglists/migrations/0003_allowlisted.py new file mode 100644 index 000000000..a3f098d9c --- /dev/null +++ b/ietf/mailinglists/migrations/0003_allowlisted.py @@ -0,0 +1,22 @@ +# Generated by Django 2.2.28 on 2022-12-05 14:26 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('person', '0029_use_timezone_now_for_person_models'), + ('mailinglists', '0002_auto_20190703_1344'), + ] + + operations = [ + migrations.RenameModel( + old_name='Whitelisted', + new_name='Allowlisted', + ), + migrations.AlterModelOptions( + name='allowlisted', + options={'verbose_name_plural': 'Allowlisted'}, + ), + ] diff --git a/ietf/mailinglists/models.py b/ietf/mailinglists/models.py index 606aab624..21f3a7671 100644 --- a/ietf/mailinglists/models.py +++ b/ietf/mailinglists/models.py @@ -28,12 +28,12 @@ class Subscribed(models.Model): class Meta: verbose_name_plural = "Subscribed" -class Whitelisted(models.Model): +class Allowlisted(models.Model): time = models.DateTimeField(auto_now_add=True) email = models.CharField("Email address", max_length=64, validators=[validate_email]) by = ForeignKey(Person) def __str__(self): - return "" % (self.email, self.time) + return "" % (self.email, self.time) class Meta: - verbose_name_plural = "Whitelisted" + verbose_name_plural = "Allowlisted" diff --git a/ietf/mailinglists/resources.py b/ietf/mailinglists/resources.py index b2fce0900..018a8327b 100644 --- a/ietf/mailinglists/resources.py +++ b/ietf/mailinglists/resources.py @@ -11,17 +11,17 @@ from tastypie.cache import SimpleCache from ietf import api from ietf.api import ToOneField # pyflakes:ignore -from ietf.mailinglists.models import Whitelisted, List, Subscribed +from ietf.mailinglists.models import Allowlisted, List, Subscribed from ietf.person.resources import PersonResource -class WhitelistedResource(ModelResource): +class AllowlistedResource(ModelResource): by = ToOneField(PersonResource, 'by') class Meta: - queryset = Whitelisted.objects.all() + queryset = Allowlisted.objects.all() serializer = api.Serializer() cache = SimpleCache() - #resource_name = 'whitelisted' + #resource_name = 'allowlisted' ordering = ['id', ] filtering = { "id": ALL, @@ -29,7 +29,7 @@ class WhitelistedResource(ModelResource): "email": ALL, "by": ALL_WITH_RELATIONS, } -api.mailinglists.register(WhitelistedResource()) +api.mailinglists.register(AllowlistedResource()) class ListResource(ModelResource): class Meta: diff --git a/ietf/name/fixtures/names.json b/ietf/name/fixtures/names.json index b17cf80ba..06dc24188 100644 --- a/ietf/name/fixtures/names.json +++ b/ietf/name/fixtures/names.json @@ -385,7 +385,7 @@ }, { "fields": { - "desc": "The document is in the RFC editor Queue (as confirmed by http://www.rfc-editor.org/queue.html).", + "desc": "The document is in the RFC editor Queue (as confirmed by https://www.rfc-editor.org/queue.html).", "name": "RFC Ed Queue", "next_states": [ 7 @@ -2585,7 +2585,7 @@ }, { "fields": { - "label": "Liason Statement State" + "label": "Liaison Statement State" }, "model": "doc.statetype", "pk": "liaison" @@ -3844,7 +3844,7 @@ { "fields": { "cc": [], - "desc": "Recipients for message to adminstrators when a charter state edit needs followon administrative action", + "desc": "Recipients for message to administrators when a charter state edit needs follow-on administrative action", "to": [ "iesg_secretary" ] @@ -5909,7 +5909,7 @@ }, { "fields": { - "desc": "The set of people who can approve this liasion statemetns", + "desc": "The set of people who can approve this liaison statements", "template": "{{liaison.approver_emails|join:\", \"}}" }, "model": "mailtrigger.recipient", diff --git a/ietf/nomcom/forms.py b/ietf/nomcom/forms.py index f0b00a485..20bf508e8 100644 --- a/ietf/nomcom/forms.py +++ b/ietf/nomcom/forms.py @@ -175,7 +175,7 @@ class MergeNomineeForm(forms.Form): secondary_emails = self.cleaned_data.get("secondary_emails") if primary_email and secondary_emails: if primary_email in secondary_emails: - msg = "Primary and secondary email address must be differents" + msg = "Primary and secondary email address must be different" self._errors["primary_email"] = self.error_class([msg]) return self.cleaned_data @@ -865,4 +865,4 @@ class VolunteerForm(forms.ModelForm): self.fields['nomcoms'].queryset = NomCom.objects.filter(is_accepting_volunteers=True).exclude(volunteer__person=person) self.fields['nomcoms'].help_text = 'You may volunteer even if the datatracker does not currently calculate that you are eligible. Eligibility will be assessed when the selection process is performed.' self.fields['affiliation'].help_text = 'Affiliation to show in the volunteer list' - self.fields['affiliation'].required = True \ No newline at end of file + self.fields['affiliation'].required = True diff --git a/ietf/person/management/commands/deactivate_email_addresses.py b/ietf/person/management/commands/deactivate_email_addresses.py index c91761987..fea8d8ee8 100644 --- a/ietf/person/management/commands/deactivate_email_addresses.py +++ b/ietf/person/management/commands/deactivate_email_addresses.py @@ -84,7 +84,7 @@ class Command(BaseCommand): email.origin = email.person.user.username if email.person.user_id else ('script: %s deactivation' % options['reason']) email.save() PersonEvent.objects.create(person=email.person, type='email_address_deactivated', - desc="Deactivated the email addres <%s>. Reason: %s" % (email.address, options['reason']) ) + desc="Deactivated the email address <%s>. Reason: %s" % (email.address, options['reason']) ) else: if email is None: not_found.append(a) diff --git a/ietf/secr/templates/telechat/group.html b/ietf/secr/templates/telechat/group.html index 288316e90..890c451e8 100644 --- a/ietf/secr/templates/telechat/group.html +++ b/ietf/secr/templates/telechat/group.html @@ -5,7 +5,7 @@ External Review NOT APPROVED;
The Secretariat will wait for instructions from
- The IESG decides the document needs more thime in INTERNAL REVIEW. The Secreatriat will put it back on the agenda for the next teleconference in the same category.
+ The IESG decides the document needs more time in INTERNAL REVIEW. The Secretariat will put it back on the agenda for the next teleconference in the same category.
The IESG has made changes since the charter was seen in INTERNAL REVIEW, and decides to send it back to INTERNAL REVIEW the charter again.
{% endif %} @@ -30,4 +30,4 @@ Yes, the charter is NOT APPROVED; The charter needs more work, or the IESG decides to shelve formation of the working group. "The Secretariat will await further instruction from regarding the rechartering of this working group."

{% endif %} - + \ No newline at end of file diff --git a/ietf/settings.py b/ietf/settings.py index 475f2cc84..144f321cc 100644 --- a/ietf/settings.py +++ b/ietf/settings.py @@ -610,7 +610,7 @@ TEST_TEMPLATE_IGNORE = [ "500.html" # isn't loaded by regular loader, but checked by test_500_page() ] -TEST_COVERAGE_MASTER_FILE = os.path.join(BASE_DIR, "../release-coverage.json") +TEST_COVERAGE_MAIN_FILE = os.path.join(BASE_DIR, "../release-coverage.json") TEST_COVERAGE_LATEST_FILE = os.path.join(BASE_DIR, "../latest-coverage.json") TEST_CODE_COVERAGE_CHECKER = None @@ -680,7 +680,7 @@ INTERNET_ALL_DRAFTS_ARCHIVE_DIR = '/a/ietfdata/doc/draft/archive' MEETING_RECORDINGS_DIR = '/a/www/audio' DERIVED_DIR = '/a/ietfdata/derived' -DOCUMENT_FORMAT_WHITELIST = ["txt", "ps", "pdf", "xml", "html", ] +DOCUMENT_FORMAT_ALLOWLIST = ["txt", "ps", "pdf", "xml", "html", ] # Mailing list info URL for lists hosted on the IETF servers MAILING_LIST_INFO_URL = "https://www.ietf.org/mailman/listinfo/%(list_addr)s" diff --git a/ietf/static/js/document_relations.js b/ietf/static/js/document_relations.js index 013b85259..07a85d0da 100644 --- a/ietf/static/js/document_relations.js +++ b/ietf/static/js/document_relations.js @@ -315,7 +315,7 @@ function draw_graph(data, group) { }) ]; - // // See https://github.com/d3/d3-force/blob/master/README.md#simulation_tick + // // See https://github.com/d3/d3-force/blob/main/README.md#simulation_tick // for (let i = 0, n = Math.ceil(Math.log(simulation.alphaMin()) / // Math.log(1 - simulation.alphaDecay())); i < // n; ++i) { diff --git a/ietf/stats/views.py b/ietf/stats/views.py index 09a25b47b..dd1cc96bd 100644 --- a/ietf/stats/views.py +++ b/ietf/stats/views.py @@ -345,7 +345,7 @@ def document_stats(request, stats_type=None): basename, ext = t ext = ext.lower() - if not any(ext==whitelisted_ext for whitelisted_ext in settings.DOCUMENT_FORMAT_WHITELIST): + if not any(ext==allowlisted_ext for allowlisted_ext in settings.DOCUMENT_FORMAT_ALLOWLIST): continue canonical_name = doc_names_with_missing_types.get(basename) diff --git a/ietf/submit/forms.py b/ietf/submit/forms.py index 79ecf46f6..7a4bd38f1 100644 --- a/ietf/submit/forms.py +++ b/ietf/submit/forms.py @@ -338,7 +338,7 @@ class SubmissionBaseUploadForm(forms.Form): if group: return group else: - raise forms.ValidationError('Draft names starting with draft-%s- are restricted, please pick a differen name' % ntype) + raise forms.ValidationError('Draft names starting with draft-%s- are restricted, please pick a different name' % ntype) return None diff --git a/ietf/sync/rfceditor.py b/ietf/sync/rfceditor.py index 1da11f01e..1fde4fa1d 100644 --- a/ietf/sync/rfceditor.py +++ b/ietf/sync/rfceditor.py @@ -567,7 +567,7 @@ def post_approved_draft(url, name): "Authorization": "Basic %s" % force_str(base64.encodebytes(smart_bytes("%s:%s" % (username, password)))).replace("\n", ""), } - log("Posting RFC-Editor notifcation of approved draft '%s' to '%s'" % (name, url)) + log("Posting RFC-Editor notification of approved draft '%s' to '%s'" % (name, url)) text = error = "" try: diff --git a/ietf/templates/base/menu_user.html b/ietf/templates/base/menu_user.html index addab232f..bb68855b6 100644 --- a/ietf/templates/base/menu_user.html +++ b/ietf/templates/base/menu_user.html @@ -186,8 +186,8 @@
  • - Account whitelist + href="{% url 'ietf.ietfauth.views.add_account_allowlist' %}"> + Account allowlist
  • {% endif %} diff --git a/ietf/templates/doc/mail/resurrect_completed_email.txt b/ietf/templates/doc/mail/resurrect_completed_email.txt index 7b5e52be5..8bff58540 100644 --- a/ietf/templates/doc/mail/resurrect_completed_email.txt +++ b/ietf/templates/doc/mail/resurrect_completed_email.txt @@ -1,4 +1,4 @@ -{% autoescape off %}As you requsted, the Internet Draft {{ doc.file_tag }} +{% autoescape off %}As you requested, the Internet Draft {{ doc.file_tag }} has been resurrected. Datatracker URL: {{ url }} diff --git a/ietf/templates/ietfauth/whitelist_form.html b/ietf/templates/ietfauth/allowlist_form.html similarity index 91% rename from ietf/templates/ietfauth/whitelist_form.html rename to ietf/templates/ietfauth/allowlist_form.html index 8b5670931..92d40e53e 100644 --- a/ietf/templates/ietfauth/whitelist_form.html +++ b/ietf/templates/ietfauth/allowlist_form.html @@ -6,18 +6,18 @@ {% block content %} {% origin %} {% if success %} -

    Whitelist entry creation successful

    +

    Allowlist entry creation successful

    Please ask the requestor to try the account creation form - again, with the whitelisted email address. + again, with the allowlisted email address.

    {% else %} -

    Add a whitelist entry for account creation.

    +

    Add an allowlist entry for account creation.

    When an email request comes in for assistance with account creation because the automated account creation has failed, you can add the - address to an account creation whitelist here. + address to an account creation allowlist here.

    Before you do so, please complete the following 3 verification steps: @@ -35,7 +35,7 @@

  • Google for the person's name within the ietf.org site: "Jane Doe site:ietf.org". If found, and the email address matches an address used in drafts or discussions, - things are fine, and it's OK to add the address to the whitelist using this form, + things are fine, and it's OK to add the address to the allowlist using this form, and ask the person to please try the account creation form again. @@ -62,7 +62,7 @@ question as given above, with lowercase "wgs".

    - If the answer to this question shows clue, then add the address to the whitelist + If the answer to this question shows clue, then add the address to the allowlist using this form, and ask the person to please try the account creation form again. @@ -72,7 +72,7 @@

    {% csrf_token %} {% bootstrap_form form %} - +
    {% endif %} {% endblock %} \ No newline at end of file diff --git a/ietf/templates/meeting/add_session_drafts.html b/ietf/templates/meeting/add_session_drafts.html index 1efcc5963..92c33ed4a 100644 --- a/ietf/templates/meeting/add_session_drafts.html +++ b/ietf/templates/meeting/add_session_drafts.html @@ -22,7 +22,7 @@
    This form will link additional drafts to this session with a revision of "Current at time of presentation". For more fine grained control of versions, or to remove a draft from a session, adjust the sessions associated with a draft from the draft's main page.
    -

    Drafts already linked to this sesssion

    +

    Drafts already linked to this session

    diff --git a/ietf/templates/nomcom/view_feedback_pending.html b/ietf/templates/nomcom/view_feedback_pending.html index 49a31efe1..890bf0d75 100644 --- a/ietf/templates/nomcom/view_feedback_pending.html +++ b/ietf/templates/nomcom/view_feedback_pending.html @@ -5,7 +5,7 @@ {% load static %} {% load nomcom_tags person_filters %} {% block pagehead %}{{ formset.media.css }}{% endblock %} -{% block subtitle %}- Feeback pending{% endblock %} +{% block subtitle %}- Feedback pending{% endblock %} {% block nomcom_content %} {% origin %}

    Feedback pending from email list

    diff --git a/ietf/utils/decorators.py b/ietf/utils/decorators.py index 634724880..d37d255a3 100644 --- a/ietf/utils/decorators.py +++ b/ietf/utils/decorators.py @@ -105,7 +105,7 @@ def _memoize(func, self, *args, **kwargs): return cache[key] def memoize(func): if not hasattr(func, '__class__'): - raise NotImplementedError("Use @lru_cache instead of memoize() for funcitons.") + raise NotImplementedError("Use @lru_cache instead of memoize() for functions.") # For methods, we want the cache on the object, not on the class, in order # to not having to think about cache bloat and content becoming stale, so # we cannot set up the cache here. diff --git a/ietf/utils/draft.py b/ietf/utils/draft.py index b89ce1bd7..eeac1747b 100755 --- a/ietf/utils/draft.py +++ b/ietf/utils/draft.py @@ -532,13 +532,13 @@ class PlaintextDraft(Draft): indent_lines.append(indent) percents = {} total = float(len(indent_lines)) - formated = False + formatted = False for indent in set(indent_lines): count = indent_lines.count(indent)/total percents[indent] = count if count > 0.9: - formated = True - if not formated: + formatted = True + if not formatted: return abstract new_abstract = [] for line in abstract.split('\n'): diff --git a/ietf/utils/mail.py b/ietf/utils/mail.py index 3500d888e..b2b9f0b9d 100644 --- a/ietf/utils/mail.py +++ b/ietf/utils/mail.py @@ -533,7 +533,7 @@ def log_smtp_exception(e): def build_warning_message(request, e): (extype, value, tb) = exception_components(e) if request: - warning = "An error occured while sending email:\n" + warning = "An error occurred while sending email:\n" if getattr(e,'original_msg',None): warning += "Subject: %s\n" % e.original_msg.get('Subject','[no subject]') warning += "To: %s\n" % e.original_msg.get('To','[no to]') diff --git a/ietf/utils/management/commands/coverage_changes.py b/ietf/utils/management/commands/coverage_changes.py index 7a445bd0c..75866226b 100644 --- a/ietf/utils/management/commands/coverage_changes.py +++ b/ietf/utils/management/commands/coverage_changes.py @@ -34,7 +34,7 @@ class Command(BaseCommand): " $ manage.py {name} --absolute --sections=url | grep False\n" "\n".format(**locals()) ) - args = "[[master_json] latest_json]" + args = "[[main_json] latest_json]" def create_parser(self, prog_name, subcommand): import argparse @@ -78,13 +78,13 @@ class Command(BaseCommand): raise CommandError("There is no data for version %s available in %s" % (version, filename)) return data[version], version - def coverage_diff(self, master, latest, sections, release=None, **options): - master_coverage, mversion = self.read_coverage(master, release) + def coverage_diff(self, main, latest, sections, release=None, **options): + main_coverage, mversion = self.read_coverage(main, release) latest_coverage, lversion = self.read_coverage(latest) self.stdout.write("\nShowing coverage differeces between %s and %s:\n" % (mversion, lversion)) for section in sections: - mcoverage = master_coverage[section]["covered"] - mformat = master_coverage[section].get("format", 1) + mcoverage = main_coverage[section]["covered"] + mformat = main_coverage[section].get("format", 1) lcoverage = latest_coverage[section]["covered"] lformat = latest_coverage[section].get("format", 1) # @@ -235,7 +235,7 @@ class Command(BaseCommand): # verbosity = int(options.get('verbosity')) if not filenames: filenames = [ - getattr(settings, 'TEST_COVERAGE_MASTER_FILE'), + getattr(settings, 'TEST_COVERAGE_MAIN_FILE'), getattr(settings, 'TEST_COVERAGE_LATEST_FILE'), ] if len(filenames) != 2: diff --git a/ietf/utils/management/commands/tests.py b/ietf/utils/management/commands/tests.py index 6619cb819..d684b31f7 100644 --- a/ietf/utils/management/commands/tests.py +++ b/ietf/utils/management/commands/tests.py @@ -15,7 +15,7 @@ import debug # pyflakes:ignore class CoverageChangeTestCase(TestCase): def test_coverage_change(self): - master_txt ="""{ + main_txt ="""{ "5.12.0": { "code": { "coverage": 0.5921474057048117, @@ -81,16 +81,16 @@ class CoverageChangeTestCase(TestCase): "version":"latest" } """ - mfh, master = tempfile.mkstemp(suffix='.json') - with io.open(master, "w") as file: - file.write(master_txt) + mfh, main = tempfile.mkstemp(suffix='.json') + with io.open(main, "w") as file: + file.write(main_txt) lfh, latest = tempfile.mkstemp(suffix='.json') with io.open(latest, "w") as file: file.write(latest_txt) output = io.StringIO() - call_command('coverage_changes', master, latest, stdout=output) + call_command('coverage_changes', main, latest, stdout=output) text = output.getvalue() - os.unlink(master) + os.unlink(main) os.unlink(latest) for l in [ diff --git a/ietf/utils/management/commands/update_external_command_info.py b/ietf/utils/management/commands/update_external_command_info.py index 9cc1d1ba4..e9e24f000 100644 --- a/ietf/utils/management/commands/update_external_command_info.py +++ b/ietf/utils/management/commands/update_external_command_info.py @@ -31,7 +31,7 @@ class Command(BaseCommand): out = out.decode('utf-8') err = err.decode('utf-8') if code != 0: - sys.stderr.write("Command '%s' retuned %s: \n%s\n%s\n" % (cmd, code, out, err)) + sys.stderr.write("Command '%s' returned %s: \n%s\n%s\n" % (cmd, code, out, err)) else: c.version = (out.strip()+'\n'+err.strip()).strip() if options.get('verbosity', 1) > 1: diff --git a/ietf/utils/test_data.py b/ietf/utils/test_data.py index 2c6f048a5..6bf502883 100644 --- a/ietf/utils/test_data.py +++ b/ietf/utils/test_data.py @@ -347,7 +347,7 @@ def make_test_data(): title="Statement regarding rights", holder_legal_name="Native Martians United", state=IprDisclosureStateName.objects.get(slug='posted'), - patent_info='Number: US12345\nTitle: A method of transfering bits\nInventor: A. Nonymous\nDate: 2000-01-01', + patent_info='Number: US12345\nTitle: A method of transferring bits\nInventor: A. Nonymous\nDate: 2000-01-01', holder_contact_name='George', holder_contact_email='george@acme.com', holder_contact_info='14 Main Street\nEarth', diff --git a/ietf/utils/test_runner.py b/ietf/utils/test_runner.py index 0cb7a8107..3a2251213 100644 --- a/ietf/utils/test_runner.py +++ b/ietf/utils/test_runner.py @@ -733,7 +733,7 @@ class IetfTestRunner(DiscoverRunner): settings.show_logging = show_logging # self.root_dir = os.path.dirname(settings.BASE_DIR) - self.coverage_file = os.path.join(self.root_dir, settings.TEST_COVERAGE_MASTER_FILE) + self.coverage_file = os.path.join(self.root_dir, settings.TEST_COVERAGE_MAIN_FILE) super(IetfTestRunner, self).__init__(**kwargs) if self.parallel > 1: if self.html_report == True: