Skip to content

Commit 220be21

Browse files
authored
chore: Use codespell to fix typos in code. (ietf-tools#4797)
* chore: Use codespell to fix typos in code. Second part of replacement of ietf-tools#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
1 parent 015ac31 commit 220be21

38 files changed

Lines changed: 120 additions & 100 deletions

ietf/api/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def get(self, request):
8080
person = get_object_or_404(self.model, user=request.user)
8181
expand = ['searchrule', 'documentauthor', 'ad_document_set', 'ad_dochistory_set', 'docevent',
8282
'ballotpositiondocevent', 'deletedevent', 'email_set', 'groupevent', 'role', 'rolehistory', 'iprdisclosurebase',
83-
'iprevent', 'liaisonstatementevent', 'whitelisted', 'schedule', 'constraint', 'schedulingevent', 'message',
83+
'iprevent', 'liaisonstatementevent', 'allowlisted', 'schedule', 'constraint', 'schedulingevent', 'message',
8484
'sendqueue', 'nominee', 'topicfeedbacklastseen', 'alias', 'email', 'apikeys', 'personevent',
8585
'reviewersettings', 'reviewsecretarysettings', 'unavailableperiod', 'reviewwish',
8686
'nextreviewerinteam', 'reviewrequest', 'meetingregistration', 'submissionevent', 'preapproval',

ietf/dbtemplate/fixtures/nomcom_templates.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ Thank you,</field>
166166
Thank you for accepting your nomination for the position of $position.
167167

168168
Please remember to complete and return the questionnaire for this position at your earliest opportunity.
169-
The questionaire is repeated below for your convenience.
169+
The questionnaire is repeated below for your convenience.
170170

171171
--------</field>
172172
<field to="group.group" name="group" rel="ManyToOneRel"><None></None></field>

ietf/dbtemplate/templates/dbtemplate/template_edit.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ <h2>Meta information</h2>
1515
<dd>{{ template.type.name }}
1616
{% if template.type.slug == "rst" %}
1717
<p class="help-block">This template uses the syntax of reStructuredText. Get a quick reference at <a href="http://docutils.sourceforge.net/docs/user/rst/quickref.html">http://docutils.sourceforge.net/docs/user/rst/quickref.html</a>.</p>
18-
<p class="help-block">You can do variable interpolation with $varialbe if the template allows any variable.</p>
18+
<p class="help-block">You can do variable interpolation with $variable if the template allows any variable.</p>
1919
{% endif %}
2020
{% if template.type.slug == "django" %}
2121
<p class="help-block">This template uses the syntax of the default django template framework. Get more info at <a href="https://docs.djangoproject.com/en/dev/topics/templates/">https://docs.djangoproject.com/en/dev/topics/templates/</a>.</p>
@@ -43,4 +43,4 @@ <h2>Edit template content</h2>
4343

4444

4545
</form>
46-
{% endblock %}
46+
{% endblock %}

ietf/dbtemplate/templates/dbtemplate/template_show.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ <h2>Meta information</h2>
1515
<dd>{{ template.type.name }}
1616
{% if template.type.slug == "rst" %}
1717
<p class="help-block">This template uses the syntax of reStructuredText. Get a quick reference at <a href="http://docutils.sourceforge.net/docs/user/rst/quickref.html">http://docutils.sourceforge.net/docs/user/rst/quickref.html</a>.</p>
18-
<p class="help-block">You can do variable interpolation with $varialbe if the template allows any variable.</p>
18+
<p class="help-block">You can do variable interpolation with $variable if the template allows any variable.</p>
1919
{% endif %}
2020
{% if template.type.slug == "django" %}
2121
<p class="help-block">This template uses the syntax of the default django template framework. Get more info at <a href="https://docs.djangoproject.com/en/dev/topics/templates/">https://docs.djangoproject.com/en/dev/topics/templates/</a>.</p>
@@ -37,4 +37,4 @@ <h2>Template content</h2>
3737
<pre class="pasted">{{ template.content|escape }}</pre>
3838
</div>
3939

40-
{% endblock %}
40+
{% endblock %}

ietf/doc/tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ class DocDraftTestCase(TestCase):
489489
1. Introduction
490490
491491
This document describes how to make the Martian networks work. The
492-
methods used in Earth do not directly translate to the efficent
492+
methods used in Earth do not directly translate to the efficient
493493
networks on Mars, as the topographical differences caused by planets.
494494
For example the avian carriers, cannot be used in the Mars, thus
495495
RFC1149 ([RFC1149]) cannot be used in Mars.

ietf/group/models.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -133,15 +133,15 @@ def has_role(self, user, role_names):
133133
role_names = [role_names]
134134
return user.is_authenticated and self.role_set.filter(name__in=role_names, person__user=user).exists()
135135

136-
def is_decendant_of(self, sought_parent):
136+
def is_descendant_of(self, sought_parent):
137137
parent = self.parent
138-
decendants = [ self, ]
139-
while (parent != None) and (parent not in decendants):
140-
decendants = [ parent ] + decendants
138+
descendants = [ self, ]
139+
while (parent != None) and (parent not in descendants):
140+
descendants = [ parent ] + descendants
141141
if parent.acronym == sought_parent:
142142
return True
143143
parent = parent.parent
144-
log.assertion('parent not in decendants')
144+
log.assertion('parent not in descendants')
145145
return False
146146

147147
def get_chair(self):

ietf/group/tests_info.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1937,12 +1937,12 @@ def test_group_parent_loop(self):
19371937
import signal
19381938

19391939
def timeout_handler(signum, frame):
1940-
raise Exception("Infinite loop in parent links is not handeled properly.")
1940+
raise Exception("Infinite loop in parent links is not handled properly.")
19411941

19421942
signal.signal(signal.SIGALRM, timeout_handler)
19431943
signal.alarm(1) # One second
19441944
try:
1945-
test2.is_decendant_of("ietf")
1945+
test2.is_descendant_of("ietf")
19461946
except AssertionError:
19471947
pass
19481948
except Exception:

ietf/ietfauth/forms.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import debug # pyflakes:ignore
1919

2020
from ietf.person.models import Person, Email
21-
from ietf.mailinglists.models import Whitelisted
21+
from ietf.mailinglists.models import Allowlisted
2222
from ietf.utils.text import isascii
2323

2424
class RegistrationForm(forms.Form):
@@ -203,9 +203,9 @@ def clean_username(self):
203203
class TestEmailForm(forms.Form):
204204
email = forms.EmailField(required=False)
205205

206-
class WhitelistForm(forms.ModelForm):
206+
class AllowlistForm(forms.ModelForm):
207207
class Meta:
208-
model = Whitelisted
208+
model = Allowlisted
209209
exclude = ['by', 'time' ]
210210

211211

ietf/ietfauth/tests.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -194,21 +194,21 @@ def register_and_verify(self, email):
194194

195195
self.assertTrue(self.username_in_htpasswd_file(email))
196196

197-
def test_create_whitelisted_account(self):
197+
def test_create_allowlisted_account(self):
198198
email = "new-account@example.com"
199199

200200
# add allowlist entry
201201
r = self.client.post(urlreverse(ietf.ietfauth.views.login), {"username":"secretary", "password":"secretary+password"})
202202
self.assertEqual(r.status_code, 302)
203203
self.assertEqual(urlsplit(r["Location"])[2], urlreverse(ietf.ietfauth.views.profile))
204204

205-
r = self.client.get(urlreverse(ietf.ietfauth.views.add_account_whitelist))
205+
r = self.client.get(urlreverse(ietf.ietfauth.views.add_account_allowlist))
206206
self.assertEqual(r.status_code, 200)
207-
self.assertContains(r, "Add a whitelist entry")
207+
self.assertContains(r, "Add an allowlist entry")
208208

209-
r = self.client.post(urlreverse(ietf.ietfauth.views.add_account_whitelist), {"email": email})
209+
r = self.client.post(urlreverse(ietf.ietfauth.views.add_account_allowlist), {"email": email})
210210
self.assertEqual(r.status_code, 200)
211-
self.assertContains(r, "Whitelist entry creation successful")
211+
self.assertContains(r, "Allowlist entry creation successful")
212212

213213
# log out
214214
r = self.client.get(urlreverse('django.contrib.auth.views.logout'))

ietf/ietfauth/urls.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@
2424
url(r'^review/$', views.review_overview),
2525
url(r'^testemail/$', views.test_email),
2626
url(r'^username/$', views.change_username),
27-
url(r'^whitelist/add/?$', views.add_account_whitelist),
27+
url(r'^allowlist/add/?$', views.add_account_allowlist),
2828
]

0 commit comments

Comments
 (0)