Skip to content

Commit 6eabd4a

Browse files
authored
chore: Use codespell to fix typos in comments. (ietf-tools#4794)
First part of replacement of ietf-tools#4651
1 parent 2636c59 commit 6eabd4a

38 files changed

Lines changed: 54 additions & 54 deletions

ietf/doc/migrations/0015_2_add_doc_document_m2m_fields.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class Migration(migrations.Migration):
6161
field=models.ManyToManyField(blank=True, related_name='tagdocs', through='doc.DocumentTags', to='name.DocTagName'),
6262
),
6363
# Here we copy the content of the existing implicit m2m tables for
64-
# the Document m2m fields into the explicit through tabeles, in order
64+
# the Document m2m fields into the explicit through tables, in order
6565
# to be able to later set the correct id from name
6666
migrations.RunPython(timestamp, timestamp),
6767
migrations.RunSQL(

ietf/doc/models.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ def _get_ref(self, meeting=None, meeting_doc_refs=settings.MEETING_DOC_HREFS):
215215
which returns an url to the datatracker page for the document.
216216
"""
217217
# If self.external_url truly is an url, use it. This is a change from
218-
# the earlier resulution order, but there's at the moment one single
218+
# the earlier resolution order, but there's at the moment one single
219219
# instance which matches this (with correct results), so we won't
220220
# break things all over the place.
221221
if not hasattr(self, '_cached_href'):
@@ -921,7 +921,7 @@ def future_presentations(self):
921921

922922
def last_presented(self):
923923
""" returns related SessionPresentation objects for the most recent meeting in the past"""
924-
# Assumes no two meetings have the same start date - if the assumption is violated, one will be chosen arbitrariy
924+
# Assumes no two meetings have the same start date - if the assumption is violated, one will be chosen arbitrarily
925925
today = date_today()
926926
candidate_presentations = self.sessionpresentation_set.filter(session__meeting__date__lte=today)
927927
candidate_meetings = set([p.session.meeting for p in candidate_presentations if p.session.meeting.end_date()<today])
@@ -1320,7 +1320,7 @@ def all_positions(self):
13201320
if e.pos != prev:
13211321
latest.old_positions.append(e.pos)
13221322

1323-
# get rid of trailling "No record" positions, some old ballots
1323+
# get rid of trailing "No record" positions, some old ballots
13241324
# have plenty of these
13251325
for p in positions:
13261326
while p.old_positions and p.old_positions[-1].slug == "norecord":

ietf/doc/templatetags/ietf_filters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ def can_defer(user,doc):
660660

661661
@register.filter()
662662
def can_ballot(user,doc):
663-
# Only IRSG memebers (and the secretariat, handled by code separately) can take positions on IRTF documents
663+
# Only IRSG members (and the secretariat, handled by code separately) can take positions on IRTF documents
664664
# Otherwise, an AD can take a position on anything that has a ballot open
665665
if doc.type_id == 'draft' and doc.stream_id == 'irtf':
666666
return has_role(user,'IRSG Member')

ietf/doc/tests.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -817,7 +817,7 @@ def test_document_draft(self):
817817
self.assertContains(r, updated_by.canonical_name())
818818
self.assertContains(r, updated_by.title)
819819

820-
# naked RFC - also wierd that we test a PS from the ISE
820+
# naked RFC - also weird that we test a PS from the ISE
821821
rfc = IndividualDraftFactory(
822822
name="rfc1234567",
823823
title="RFC without a Draft",
@@ -2580,7 +2580,7 @@ def setUp(self):
25802580
self.doc.save_with_history([e])
25812581

25822582
# This is necessary for the view to be able to find the document
2583-
# which hints that the view has an issue : if a materials document is taken out of all SessionPresentations, it is no longer accessable by this view
2583+
# which hints that the view has an issue : if a materials document is taken out of all SessionPresentations, it is no longer accessible by this view
25842584
SessionPresentationFactory(session__meeting__number=meeting_number, session__group=self.doc.group, document=self.doc)
25852585

25862586
def test_markdown_and_text(self):

ietf/doc/tests_draft.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,7 @@ class ExpireIDsTests(DraftFileMixin, TestCase):
635635
def test_in_draft_expire_freeze(self):
636636
from ietf.doc.expire import in_draft_expire_freeze
637637

638-
# If there is no "next" meeting, we musn't be in a freeze
638+
# If there is no "next" meeting, we mustn't be in a freeze
639639
self.assertTrue(not in_draft_expire_freeze())
640640

641641
meeting = Meeting.objects.create(number="123",

ietf/doc/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1346,7 +1346,7 @@ def bibxml_for_draft(doc, rev=None):
13461346
raise Http404("Revision not found")
13471347

13481348
# Build the date we want to claim for the document in the bibxml
1349-
# For documents that have relevent NewRevisionDocEvents, use the date of the event.
1349+
# For documents that have relevant NewRevisionDocEvents, use the date of the event.
13501350
# Very old documents don't have NewRevisionDocEvents - just use the document time.
13511351

13521352
latest_revision_event = doc.latest_event(NewRevisionDocEvent, type="new_revision")

ietf/doc/views_charter.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ def change_state(request, name, option=None):
163163
if message or charter_state.slug == "intrev" or charter_state.slug == "extrev":
164164
email_admin_re_charter(request, group, "Charter state changed to \"%s\"" % charter_state.name, message,'charter_state_edit_admin_needed')
165165

166-
# TODO - do we need a seperate set of recipients for state changes to charters vrs other kind of documents
166+
# TODO - do we need a separate set of recipients for state changes to charters vrs other kind of documents
167167
email_state_changed(request, charter, "State changed to %s." % charter_state, 'doc_state_edited')
168168

169169
if charter_state.slug == "intrev" and group.type_id == "wg":
@@ -835,4 +835,4 @@ def charter_with_milestones_txt(request, name, rev):
835835
return render(request, 'doc/charter/charter_with_milestones.txt',
836836
dict(charter_text=charter_text,
837837
milestones=milestones),
838-
content_type="text/plain; charset=%s"%settings.DEFAULT_CHARSET)
838+
content_type="text/plain; charset=%s"%settings.DEFAULT_CHARSET)

ietf/doc/views_search.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ def cached_redirect(cache_key, url):
280280
if redirect_to:
281281
return cached_redirect(cache_key, urlreverse("ietf.doc.views_doc.document_main", kwargs={ "name": redirect_to }))
282282
else:
283-
# check for embedded rev - this may be ambigious, so don't
283+
# check for embedded rev - this may be ambiguous, so don't
284284
# chop it off if we don't find a match
285285
rev_split = re.search("^(.+)-([0-9]{2})$", n)
286286
if rev_split:

ietf/group/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ class GroupMilestoneHistory(GroupMilestoneInfo):
335335
milestone = ForeignKey(GroupMilestone, related_name="history_set")
336336

337337
class GroupStateTransitions(models.Model):
338-
"""Captures that a group has overriden the default available
338+
"""Captures that a group has overridden the default available
339339
document state transitions for a certain state."""
340340
group = ForeignKey(Group)
341341
state = ForeignKey('doc.State', help_text="State for which the next states should be overridden")

ietf/group/tests_info.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1963,7 +1963,7 @@ def test_admin_acronym_validation(self):
19631963
self.assertIn('acronym',form.errors)
19641964
form = AdminGroupForm({'acronym':'f','name':'should fail','type':'wg','state':'active','used_roles':'[]','time':now})
19651965
self.assertIn('acronym',form.errors)
1966-
# For the ITU we have a heirarchy of group names that use hyphens as delimeters
1966+
# For the ITU we have a hierarchy of group names that use hyphens as delimiters
19671967
form = AdminGroupForm({'acronym':'should-pass','name':'should pass','type':'sdo','state':'active','used_roles':'[]','time':now})
19681968
self.assertTrue(form.is_valid())
19691969
form = AdminGroupForm({'acronym':'shouldfail-','name':'should fail','type':'wg','state':'active','used_roles':'[]','time':now})

0 commit comments

Comments
 (0)