← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~cjwatson/launchpad:codespell-buildmaster-code into launchpad:master

 

Colin Watson has proposed merging ~cjwatson/launchpad:codespell-buildmaster-code into launchpad:master.

Commit message:
Fix spelling errors in lp.{buildmaster,code}

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/437854
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:codespell-buildmaster-code into launchpad:master.
diff --git a/.codespell-ignore b/.codespell-ignore
new file mode 100644
index 0000000..770e5aa
--- /dev/null
+++ b/.codespell-ignore
@@ -0,0 +1,3 @@
+buildd
+changee
+iterm
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 2cd64a1..c1e3cd9 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -21,6 +21,8 @@ repos:
     -   id: check-yaml
     -   id: debug-statements
         exclude: systemdocs\.py
+    -   id: file-contents-sorter
+        files: ^\.codespell-ignore
     -   id: no-commit-to-branch
         args: [--branch, master, --branch, db-devel]
 -   repo: https://github.com/asottile/pyupgrade
@@ -83,6 +85,7 @@ repos:
     rev: v2.2.2
     hooks:
     -   id: codespell
+        args: ["-I", ".codespell-ignore"]
         files: ^(doc/.*\.rst|.*\.js)$
 -   repo: https://github.com/get-woke/woke
     rev: v0.19.0
diff --git a/lib/lp/buildmaster/enums.py b/lib/lp/buildmaster/enums.py
index d71a650..ad32e14 100644
--- a/lib/lp/buildmaster/enums.py
+++ b/lib/lp/buildmaster/enums.py
@@ -109,7 +109,7 @@ class BuildStatus(DBEnumeratedType):
         Failed to upload
 
         Build record is an historic account of a build that could not be
-        uploaded correctly. It's mainly genereated by failures in
+        uploaded correctly. It's mainly generated by failures in
         process-upload which quietly rejects the binary upload resulted
         by the build procedure.
         In those cases all the build historic information will be stored (
diff --git a/lib/lp/buildmaster/queuedepth.py b/lib/lp/buildmaster/queuedepth.py
index 1a92c14..52e561b 100644
--- a/lib/lp/buildmaster/queuedepth.py
+++ b/lib/lp/buildmaster/queuedepth.py
@@ -119,7 +119,7 @@ def estimate_time_to_next_builder(bq, now=None):
         - *not* processor dependent: all builders with the matching
             virtualization setting should be considered.
 
-    :return: The estimated number of seconds untils a builder capable of
+    :return: The estimated number of seconds until a builder capable of
         running the head job becomes available.
     """
     head_job_platform = get_head_job_platform(bq)
@@ -292,7 +292,7 @@ def estimate_job_delay(bq, builder_stats):
             job_counts[platform] += job_count
 
     sum_of_delays = 0
-    # Now devide the delays based on a jobs/builders comparison.
+    # Now divide the delays based on a jobs/builders comparison.
     for platform, duration in delays.items():
         jobs = job_counts[platform]
         builders = builder_stats[platform]
diff --git a/lib/lp/buildmaster/stories/builder-views.rst b/lib/lp/buildmaster/stories/builder-views.rst
index 764e6cb..3c3f280 100644
--- a/lib/lp/buildmaster/stories/builder-views.rst
+++ b/lib/lp/buildmaster/stories/builder-views.rst
@@ -354,7 +354,7 @@ Each `BuilderGroup` contains the following attributes:
  * number_of_available_builders: the number of builders available for
        this processor.
 
- * queue_size: the number of jobs wainting to be processed for one of
+ * queue_size: the number of jobs waiting to be processed for one of
    the builders in this group
 
  * duration: estimated time that will be used to build all jobs in
diff --git a/lib/lp/buildmaster/stories/xx-buildfarm-index.rst b/lib/lp/buildmaster/stories/xx-buildfarm-index.rst
index b58a4db..89aa362 100644
--- a/lib/lp/buildmaster/stories/xx-buildfarm-index.rst
+++ b/lib/lp/buildmaster/stories/xx-buildfarm-index.rst
@@ -150,7 +150,7 @@ location.
     >>> admin_browser.getControl("Title").value = "Tubaina"
     >>> admin_browser.getControl("URL").value = "http://tubaina.buildd";
 
-Additionaly, the administrator can select the processor corresponding
+Additionally, the administrator can select the processor corresponding
 to the builder.
 
     >>> admin_browser.getControl(name="field.processors").options
diff --git a/lib/lp/buildmaster/tests/test_buildfarmjob.py b/lib/lp/buildmaster/tests/test_buildfarmjob.py
index 994e3a9..94de00b 100644
--- a/lib/lp/buildmaster/tests/test_buildfarmjob.py
+++ b/lib/lp/buildmaster/tests/test_buildfarmjob.py
@@ -92,7 +92,7 @@ class TestBuildFarmJob(TestBuildFarmJobBase, TestCaseWithFactory):
 
     def test_date_created(self):
         # date_created can be passed optionally when creating a
-        # bulid farm job to ensure we don't get identical timestamps
+        # build farm job to ensure we don't get identical timestamps
         # when transactions are committed.
         ten_years_ago = datetime.now(pytz.UTC) - timedelta(365 * 10)
         build_farm_job = getUtility(IBuildFarmJobSource).new(
diff --git a/lib/lp/buildmaster/tests/test_manager.py b/lib/lp/buildmaster/tests/test_manager.py
index 0b93e76..a568d64 100644
--- a/lib/lp/buildmaster/tests/test_manager.py
+++ b/lib/lp/buildmaster/tests/test_manager.py
@@ -1783,7 +1783,7 @@ class TestBuilddManagerScript(TestCaseWithFactory):
         self.useFixture(test_setup)
         # The process logs to the logfile.
         self.assertTrue(is_file_growing(logfilepath))
-        # No rotation occured.
+        # No rotation occurred.
         self.assertFalse(
             os.access(rotated_logfilepath, os.F_OK),
             "Twistd's log file was rotated by twistd.",
diff --git a/lib/lp/buildmaster/tests/test_queuedepth.py b/lib/lp/buildmaster/tests/test_queuedepth.py
index 6261ff2..5c215cc 100644
--- a/lib/lp/buildmaster/tests/test_queuedepth.py
+++ b/lib/lp/buildmaster/tests/test_queuedepth.py
@@ -532,7 +532,7 @@ class TestBuilderData(SingleArchBuildsBase):
 
 
 class TestMinTimeToNextBuilder(SingleArchBuildsBase):
-    """Test estimated time-to-builder with builds targetting a single
+    """Test estimated time-to-builder with builds targeting a single
     processor."""
 
     def test_min_time_to_next_builder(self):
@@ -573,7 +573,7 @@ class TestMinTimeToNextBuilder(SingleArchBuildsBase):
 
         assign_to_builder(self, "gcc", 4)
         # Now that no builder is immediately available, the shortest
-        # remaing build time (based on the estimated duration) is returned:
+        # remaining build time (based on the estimated duration) is returned:
         #   300 seconds
         # This is equivalent to the 'gcc' job's estimated duration.
         check_mintime_to_builder(self, apg_job, 300)
@@ -768,7 +768,7 @@ class TestMinTimeToNextBuilderMulti(MultiArchBuildsBase):
 
         assign_to_builder(self, "bison", 3, "hppa")
         # Now that no builder is immediately available, the shortest
-        # remaing build time (based on the estimated duration) is returned:
+        # remaining build time (based on the estimated duration) is returned:
         #   660 seconds
         # This is equivalent to the 'bison' job's estimated duration.
         check_mintime_to_builder(self, apg_job, 660)
diff --git a/lib/lp/code/browser/branch.py b/lib/lp/code/browser/branch.py
index c12a290..544176b 100644
--- a/lib/lp/code/browser/branch.py
+++ b/lib/lp/code/browser/branch.py
@@ -278,7 +278,7 @@ class BranchContextMenu(ContextMenu, HasRecipesMenuMixin, HasSnapsMenuMixin):
     def browse_revisions(self):
         """Return a link to the branch's revisions on codebrowse."""
         text = "All revisions"
-        enabled = self.context.code_is_browseable
+        enabled = self.context.code_is_browsable
         url = self.context.getCodebrowseUrl("changes")
         return Link(url, text, enabled=enabled)
 
@@ -328,7 +328,7 @@ class BranchContextMenu(ContextMenu, HasRecipesMenuMixin, HasSnapsMenuMixin):
     def source(self):
         """Return a link to the branch's file listing on codebrowse."""
         text = "Browse the code"
-        enabled = self.context.code_is_browseable
+        enabled = self.context.code_is_browsable
         url = self.context.getCodebrowseUrl("files")
         return Link(url, text, icon="info", enabled=enabled)
 
@@ -838,7 +838,7 @@ class BranchEditFormView(LaunchpadEditFormView):
 
         if changed:
             # Notify the object has changed with the snapshot that was taken
-            # earler.
+            # earlier.
             field_names = [
                 form_field.__name__ for form_field in self.form_fields
             ]
@@ -1406,7 +1406,7 @@ class RegisterBranchMergeProposalView(LaunchpadFormView):
         # Make sure that the target branch is different from the context.
         if target_branch is None:
             # Skip the following tests.
-            # The existance of the target_branch is handled by the form
+            # The existence of the target_branch is handled by the form
             # machinery.
             pass
         elif source_branch == target_branch:
diff --git a/lib/lp/code/browser/branchlisting.py b/lib/lp/code/browser/branchlisting.py
index f3cb9bd..a6a8581 100644
--- a/lib/lp/code/browser/branchlisting.py
+++ b/lib/lp/code/browser/branchlisting.py
@@ -760,7 +760,7 @@ class NoContextBranchListingView(BranchListingView):
 
 
 class RecentlyRegisteredBranchesView(NoContextBranchListingView):
-    """A batched view of branches orded by registration date."""
+    """A batched view of branches ordered by registration date."""
 
     page_title = "Recently registered branches"
 
@@ -775,7 +775,7 @@ class RecentlyRegisteredBranchesView(NoContextBranchListingView):
 
 
 class RecentlyImportedBranchesView(NoContextBranchListingView):
-    """A batched view of imported branches ordered by last modifed time."""
+    """A batched view of imported branches ordered by last modified time."""
 
     page_title = "Recently imported branches"
     extra_columns = ("product", "date_created")
diff --git a/lib/lp/code/browser/branchmergeproposal.py b/lib/lp/code/browser/branchmergeproposal.py
index 019b22c..6631a94 100644
--- a/lib/lp/code/browser/branchmergeproposal.py
+++ b/lib/lp/code/browser/branchmergeproposal.py
@@ -1568,7 +1568,7 @@ class BranchMergeProposalAddVoteView(LaunchpadFormView):
             )
             if vote_ref is not None:
                 # Claim this vote reference, i.e. say that the individual
-                # self. user is doing this review ond behalf of the 'reviewer'
+                # self.user is doing this review on behalf of the 'reviewer'
                 # team.
                 vote_ref.claimReview(self.user)
 
diff --git a/lib/lp/code/browser/branchmergeproposallisting.py b/lib/lp/code/browser/branchmergeproposallisting.py
index d98b467..c51d65f 100644
--- a/lib/lp/code/browser/branchmergeproposallisting.py
+++ b/lib/lp/code/browser/branchmergeproposallisting.py
@@ -364,7 +364,7 @@ class ActiveReviewsView(BranchMergeProposalListingView):
                     else:
                         return self.ARE_DOING
                 # Since team reviews are always pending, and we've eliminated
-                # the case where the reviewer is ther person, then if
+                # the case where the reviewer is the person, then if
                 # the reviewer is in the reviewer team, it is a can do.
                 if reviewer.inTeam(vote.reviewer):
                     result = self.CAN_DO
diff --git a/lib/lp/code/browser/codeimport.py b/lib/lp/code/browser/codeimport.py
index e856781..f267fc1 100644
--- a/lib/lp/code/browser/codeimport.py
+++ b/lib/lp/code/browser/codeimport.py
@@ -588,7 +588,7 @@ def _makeEditAction(label, status, text):
     :param status: If the code import has this as its review_status, don't
         show the button (always show the button if it is None).
     :param text: The text to go after 'The code import has been' in a
-        notifcation, if a change was made.
+        notification, if a change was made.
     """
     if status is not None:
 
diff --git a/lib/lp/code/browser/codereviewvote.py b/lib/lp/code/browser/codereviewvote.py
index 3996bb7..c4db88f 100644
--- a/lib/lp/code/browser/codereviewvote.py
+++ b/lib/lp/code/browser/codereviewvote.py
@@ -24,7 +24,7 @@ class ReassignSchema(Interface):
 
 
 class CodeReviewVoteReassign(LaunchpadFormView):
-    """View for reassinging the reviewer for a requested review."""
+    """View for reassigning the reviewer for a requested review."""
 
     schema = ReassignSchema
 
diff --git a/lib/lp/code/browser/sourcepackagerecipe.py b/lib/lp/code/browser/sourcepackagerecipe.py
index baed5b7..5bcfd7f 100644
--- a/lib/lp/code/browser/sourcepackagerecipe.py
+++ b/lib/lp/code/browser/sourcepackagerecipe.py
@@ -663,7 +663,7 @@ class ISourcePackageAddSchema(ISourcePackageEditSchema):
 
 
 class ErrorHandled(Exception):
-    """A field error occured and was handled."""
+    """A field error occurred and was handled."""
 
 
 class RecipeTextValidatorMixin:
diff --git a/lib/lp/code/browser/tests/test_branchmergeproposal.py b/lib/lp/code/browser/tests/test_branchmergeproposal.py
index a69662c..5042014 100644
--- a/lib/lp/code/browser/tests/test_branchmergeproposal.py
+++ b/lib/lp/code/browser/tests/test_branchmergeproposal.py
@@ -2822,7 +2822,7 @@ class TestBranchMergeProposal(BrowserTestCase):
         self.assertThat(browser.contents, HTMLContains(body))
 
     def test_excessive_conversation_comments_no_redirect(self):
-        """An excessive comment does not force a redict on proposal page."""
+        """An excessive comment does not force a redirect on proposal page."""
         comment = self.factory.makeCodeReviewComment(body="x" * 10001)
         mp_url = canonical_url(comment.branch_merge_proposal)
         has_read_more = self.has_read_more(comment)
diff --git a/lib/lp/code/browser/tests/test_product.py b/lib/lp/code/browser/tests/test_product.py
index 80c07d4..99148c8 100644
--- a/lib/lp/code/browser/tests/test_product.py
+++ b/lib/lp/code/browser/tests/test_product.py
@@ -67,22 +67,22 @@ class TestProductBranchesView(ProductTestBase):
         else:
             self.fail("Browse link present when it should not have been.")
 
-    def test_browseable_branch_has_link(self):
-        # If the product's development focus branch is browseable, there is a
+    def test_browsable_branch_has_link(self):
+        # If the product's development focus branch is browsable, there is a
         # 'browse code' link.
         product, branch = self.makeProductAndDevelopmentFocusBranch()
         branch.updateScannedDetails(self.factory.makeRevision(), 1)
-        self.assertTrue(branch.code_is_browseable)
+        self.assertTrue(branch.code_is_browsable)
 
         link = self.getBranchSummaryBrowseLinkForProduct(product)
         login(ANONYMOUS)
         self.assertEqual(link.url, branch.browse_source_url)
 
-    def test_unbrowseable_branch_does_not_have_link(self):
-        # If the product's development focus branch is not browseable, there
+    def test_unbrowsable_branch_does_not_have_link(self):
+        # If the product's development focus branch is not browsable, there
         # is not a 'browse code' link.
         product, branch = self.makeProductAndDevelopmentFocusBranch()
-        self.assertFalse(branch.code_is_browseable)
+        self.assertFalse(branch.code_is_browsable)
 
         self.assertProductBranchSummaryDoesNotHaveBrowseLink(product)
 
diff --git a/lib/lp/code/browser/tests/test_sourcepackagerecipe.py b/lib/lp/code/browser/tests/test_sourcepackagerecipe.py
index 9036fd5..06c038b 100644
--- a/lib/lp/code/browser/tests/test_sourcepackagerecipe.py
+++ b/lib/lp/code/browser/tests/test_sourcepackagerecipe.py
@@ -775,7 +775,7 @@ class TestSourcePackageRecipeAddViewMixin:
 
     def test_create_new_ppa_duplicate(self):
         # If a new PPA is being created, and the user already has a ppa of the
-        # name specifed an error is shown.
+        # name specified, an error is shown.
         self.user = self.factory.makePerson(name="eric")
         # Make a PPA called 'ppa' using the default.
         with person_logged_in(self.user):
diff --git a/lib/lp/code/doc/code-jobs.rst b/lib/lp/code/doc/code-jobs.rst
index 732d9d6..281d70d 100644
--- a/lib/lp/code/doc/code-jobs.rst
+++ b/lib/lp/code/doc/code-jobs.rst
@@ -39,7 +39,7 @@ BranchJobType.IMPORT
 ....................
 
 The json data here would effectively store the text of the message.  Used
-primarily in the status changes on the import job itself.  Perhpas this should
+primarily in the status changes on the import job itself.  Perhaps this should
 be combined with the attribute type email and have a general preamble for the
 generated email.
 
@@ -68,7 +68,7 @@ and the initial reviewer if one was requested.
 BranchMergeProposalJobType.COMMENT
 ..................................
 
-The json data here refers to the identify of the commit message.
+The json data here refers to the identity of the commit message.
 
 BranchMergeProposalJobType.NEW_REVIEWER
 .......................................
@@ -80,5 +80,5 @@ BranchMergeProposalJobType.DIFF_GENERATION
 ..........................................
 
 The dynamic moving diff has been determined to be out of date, and a new diff
-needs to be generated.  This is processed by the merge analysis deamon.
+needs to be generated.  This is processed by the merge analysis daemon.
 
diff --git a/lib/lp/code/doc/codeimport.rst b/lib/lp/code/doc/codeimport.rst
index 47fb4cd..e1db098 100644
--- a/lib/lp/code/doc/codeimport.rst
+++ b/lib/lp/code/doc/codeimport.rst
@@ -4,7 +4,7 @@ Code Imports
 CodeImport objects model the process surrounding the code import
 service of Launchpad. A CodeImport object is created by a user
 requesting an import, the import source is then reviewed by privileged
-users. Then the code import servoce performs the initial import that
+users. Then the code import service performs the initial import that
 populates the import branch, and updates it regularly.
 
 We can import code from CVS or Subversion.
@@ -448,7 +448,7 @@ And a single Git import.
     >>> git_imports[0].rcs_type.name
     'GIT'
 
-Passing both paramters is combined as "and".
+Passing both parameters is combined as "and".
 
     >>> reviewed_git_imports = list(
     ...     code_import_set.search(
diff --git a/lib/lp/code/feed/templates/branch.pt b/lib/lp/code/feed/templates/branch.pt
index f9e89fc..f97d851 100644
--- a/lib/lp/code/feed/templates/branch.pt
+++ b/lib/lp/code/feed/templates/branch.pt
@@ -34,9 +34,9 @@
         </tal:comment>
         <a tal:attributes="href python: context.getCodebrowseUrlForRevision(rev_no.sequence)"
            tal:content="rev_no/sequence"
-           tal:condition="context/code_is_browseable">
+           tal:condition="context/code_is_browsable">
           1
-        </a><tal:revno condition="not: context/code_is_browseable"
+        </a><tal:revno condition="not: context/code_is_browsable"
                        replace="rev_no/sequence">1</tal:revno>.
         By
         <strong>
diff --git a/lib/lp/code/feed/tests/test_revision.py b/lib/lp/code/feed/tests/test_revision.py
index 8ae4109..a2ed1a6 100644
--- a/lib/lp/code/feed/tests/test_revision.py
+++ b/lib/lp/code/feed/tests/test_revision.py
@@ -55,7 +55,7 @@ class TestRevisionFeed(TestCaseWithFactory):
 
     def _createFeed(self):
         """Create and return a RevisionListingFeed instance."""
-        # The FeedBase class determins the feed type by the end of the
+        # The FeedBase class determines the feed type by the end of the
         # requested URL, so forcing .atom here.
         return RevisionListingFeed(
             None,
@@ -105,7 +105,7 @@ class TestProductRevisionFeed(TestCaseWithFactory):
 
     def _createFeed(self, product):
         """Create and return a ProductRevisionFeed instance."""
-        # The FeedBase class determins the feed type by the end of the
+        # The FeedBase class determines the feed type by the end of the
         # requested URL, so forcing .atom here.
         return ProductRevisionFeed(
             product,
diff --git a/lib/lp/code/interfaces/branch.py b/lib/lp/code/interfaces/branch.py
index d579132..69cc976 100644
--- a/lib/lp/code/interfaces/branch.py
+++ b/lib/lp/code/interfaces/branch.py
@@ -818,8 +818,8 @@ class IBranchView(
         :returns: A resultset of tuples for (BranchRevision, Revision)
         """
 
-    code_is_browseable = Attribute(
-        "Is the code in this branch accessable through codebrowse?"
+    code_is_browsable = Attribute(
+        "Is the code in this branch accessible through codebrowse?"
     )
 
     def getCodebrowseUrl(*extras):
@@ -1114,7 +1114,7 @@ class IBranchView(
             1. Ancestry set of bzr revision-ids.
             2. History list of bzr revision-ids. Similar to the result of
                breezy.Branch.revision_history().
-            3. Dictionnary mapping bzr bzr revision-ids to the database ids of
+            3. Dictionary mapping bzr bzr revision-ids to the database ids of
                the corresponding BranchRevision rows for this branch.
         """
 
diff --git a/lib/lp/code/interfaces/codeimportevent.py b/lib/lp/code/interfaces/codeimportevent.py
index a3906db..53858b5 100644
--- a/lib/lp/code/interfaces/codeimportevent.py
+++ b/lib/lp/code/interfaces/codeimportevent.py
@@ -51,7 +51,7 @@ class ICodeImportEvent(Interface):
         required=False,
         readonly=True,
         vocabulary="CodeImportMachine",
-        description=_("The import machine where this event occured." ""),
+        description=_("The import machine where this event occurred."),
     )
 
     def items():
diff --git a/lib/lp/code/interfaces/codeimportmachine.py b/lib/lp/code/interfaces/codeimportmachine.py
index 9ae3ef5..7810e99 100644
--- a/lib/lp/code/interfaces/codeimportmachine.py
+++ b/lib/lp/code/interfaces/codeimportmachine.py
@@ -47,7 +47,7 @@ class ICodeImportMachine(Interface):
     heartbeat = Datetime(
         title=_("Heartbeat"),
         description=_(
-            "When the controller deamon last recorded it was" " running."
+            "When the controller daemon last recorded it was running."
         ),
     )
 
diff --git a/lib/lp/code/interfaces/codeimportresult.py b/lib/lp/code/interfaces/codeimportresult.py
index 89fde0f..e25b7d8 100644
--- a/lib/lp/code/interfaces/codeimportresult.py
+++ b/lib/lp/code/interfaces/codeimportresult.py
@@ -63,7 +63,7 @@ class ICodeImportResult(Interface):
             "A partial log of the job for users to see. It is "
             "normally only recorded if the job failed in a step "
             "that interacts with the remote repository. If a job "
-            "was successful, or failed in a houskeeping step, the "
+            "was successful, or failed in a housekeeping step, the "
             "log file would not contain information useful to the "
             "user."
         ),
diff --git a/lib/lp/code/interfaces/hasbranches.py b/lib/lp/code/interfaces/hasbranches.py
index cd2fb3b..7fc29b0 100644
--- a/lib/lp/code/interfaces/hasbranches.py
+++ b/lib/lp/code/interfaces/hasbranches.py
@@ -40,7 +40,7 @@ class IHasBranches(Interface):
     the objects that implement this interface.
     """
 
-    # In order to minimise dependancies the returns_collection is defined as
+    # In order to minimise dependencies the returns_collection is defined as
     # Interface here and defined fully in the circular imports file.
 
     @operation_parameters(
@@ -82,7 +82,7 @@ class IHasMergeProposals(Interface):
     the objects that implement this interface.
     """
 
-    # In order to minimise dependancies the returns_collection is defined as
+    # In order to minimise dependencies the returns_collection is defined as
     # Interface here and defined fully in the circular imports file.
 
     @operation_parameters(
@@ -113,7 +113,7 @@ class IHasRequestedReviews(Interface):
     for a particular person.
     """
 
-    # In order to minimise dependancies the returns_collection is defined as
+    # In order to minimise dependencies the returns_collection is defined as
     # Interface here and defined fully in the circular imports file.
 
     @operation_parameters(
diff --git a/lib/lp/code/mail/codehandler.py b/lib/lp/code/mail/codehandler.py
index 90bfb73..7a8a3f0 100644
--- a/lib/lp/code/mail/codehandler.py
+++ b/lib/lp/code/mail/codehandler.py
@@ -197,7 +197,7 @@ class AddReviewerEmailCommand(CodeReviewEmailCommand):
 
 
 class CodeEmailCommands(EmailCommandCollection):
-    """A colleciton of email commands for code."""
+    """A collection of email commands for code."""
 
     _commands = {
         "vote": VoteEmailCommand,
diff --git a/lib/lp/code/mail/tests/test_codehandler.py b/lib/lp/code/mail/tests/test_codehandler.py
index f51eaab..82d770d 100644
--- a/lib/lp/code/mail/tests/test_codehandler.py
+++ b/lib/lp/code/mail/tests/test_codehandler.py
@@ -122,7 +122,7 @@ class TestGetCodeEmailCommands(TestCase):
 
 
 class TestCodeHandler(TestCaseWithFactory):
-    """Test the code email hander."""
+    """Test the code email handler."""
 
     layer = ZopelessAppServerLayer
 
diff --git a/lib/lp/code/mail/tests/test_codeimport.py b/lib/lp/code/mail/tests/test_codeimport.py
index c27904a..90cd288 100644
--- a/lib/lp/code/mail/tests/test_codeimport.py
+++ b/lib/lp/code/mail/tests/test_codeimport.py
@@ -31,7 +31,7 @@ class TestNewCodeImports(TestCaseWithFactory):
         # Eric needs to be logged in for the mail to be sent.
         login_person(eric)
         self.factory.makeProductCodeImport(
-            cvs_root=":pserver:anonymouse@xxxxxxxxxxxxxxx:/cvsroot",
+            cvs_root=":pserver:anon@xxxxxxxxxxxxxxx:/cvsroot",
             cvs_module="a_module",
             branch_name="import",
             product=fooix,
@@ -45,7 +45,7 @@ class TestNewCodeImports(TestCaseWithFactory):
             "A new CVS code import has been requested by Eric:\n"
             "    http://code.launchpad.test/~eric/fooix/import\n";
             "from\n"
-            "    :pserver:anonymouse@xxxxxxxxxxxxxxx:/cvsroot, a_module\n"
+            "    :pserver:anon@xxxxxxxxxxxxxxx:/cvsroot, a_module\n"
             "\n"
             "-- \nYou are getting this email because you are a member of the "
             "vcs-imports team.\n",
@@ -233,7 +233,7 @@ class TestUpdatedCodeImports(TestCaseWithFactory):
 
     def test_cvs_to_bzr_import_same_details(self):
         code_import = self.factory.makeProductCodeImport(
-            cvs_root=":pserver:anonymouse@xxxxxxxxxxxxxxx:/cvsroot",
+            cvs_root=":pserver:anon@xxxxxxxxxxxxxxx:/cvsroot",
             cvs_module="a_module",
         )
         unique_name = code_import.target.unique_name
@@ -243,13 +243,13 @@ class TestUpdatedCodeImports(TestCaseWithFactory):
         )
         transaction.commit()
         self.assertSameDetailsEmail(
-            "a_module from :pserver:anonymouse@xxxxxxxxxxxxxxx:/cvsroot",
+            "a_module from :pserver:anon@xxxxxxxxxxxxxxx:/cvsroot",
             unique_name,
         )
 
     def test_cvs_to_bzr_import_different_details(self):
         code_import = self.factory.makeProductCodeImport(
-            cvs_root=":pserver:anonymouse@xxxxxxxxxxxxxxx:/cvsroot",
+            cvs_root=":pserver:anon@xxxxxxxxxxxxxxx:/cvsroot",
             cvs_module="a_module",
         )
         unique_name = code_import.target.unique_name
@@ -257,8 +257,8 @@ class TestUpdatedCodeImports(TestCaseWithFactory):
         code_import.updateFromData({"cvs_module": "another_module"}, user)
         transaction.commit()
         self.assertDifferentDetailsEmail(
-            "a_module from :pserver:anonymouse@xxxxxxxxxxxxxxx:/cvsroot",
-            "another_module from :pserver:anonymouse@xxxxxxxxxxxxxxx:/cvsroot",
+            "a_module from :pserver:anon@xxxxxxxxxxxxxxx:/cvsroot",
+            "another_module from :pserver:anon@xxxxxxxxxxxxxxx:/cvsroot",
             unique_name,
         )
 
diff --git a/lib/lp/code/model/branch.py b/lib/lp/code/model/branch.py
index 71c7fc9..93b75cf 100644
--- a/lib/lp/code/model/branch.py
+++ b/lib/lp/code/model/branch.py
@@ -336,7 +336,7 @@ class Branch(SQLBase, WebhookTargetMixin, BzrIdentityMixin):
 
     # The unique_name is maintined by a SQL trigger.
     unique_name = StringCol()
-    # Denormalised colums used primarily for sorting.
+    # Denormalised columns used primarily for sorting.
     owner_name = StringCol()
     target_suffix = StringCol()
 
@@ -793,7 +793,7 @@ class Branch(SQLBase, WebhookTargetMixin, BzrIdentityMixin):
         return stacked_on_branches
 
     @property
-    def code_is_browseable(self):
+    def code_is_browsable(self):
         """See `IBranch`."""
         return self.revision_count > 0 or self.last_mirrored != None
 
@@ -1327,7 +1327,7 @@ class Branch(SQLBase, WebhookTargetMixin, BzrIdentityMixin):
         if (revision_id != self.last_scanned_id) or (
             revision_count != self.revision_count
         ):
-            # If the date of the last revision is greated than the date last
+            # If the date of the last revision is greater than the date last
             # modified, then bring the date last modified forward to the last
             # revision date (as long as the revision date isn't in the
             # future).
diff --git a/lib/lp/code/model/branchmergeproposal.py b/lib/lp/code/model/branchmergeproposal.py
index 884e943..bf927c8 100644
--- a/lib/lp/code/model/branchmergeproposal.py
+++ b/lib/lp/code/model/branchmergeproposal.py
@@ -707,7 +707,7 @@ class BranchMergeProposal(SQLBase, BugLinkTargetMixin):
         # Don't add a team reviewer to the recipients as they are only going
         # to get emails normally if they are subscribed to one of the
         # branches, and if they are subscribed, they'll be getting this email
-        # aleady.
+        # already.
         for review in self.votes:
             reviewer = review.reviewer
             pending = review.comment is None
diff --git a/lib/lp/code/model/branchtarget.py b/lib/lp/code/model/branchtarget.py
index 5eddbe3..d31db1c 100644
--- a/lib/lp/code/model/branchtarget.py
+++ b/lib/lp/code/model/branchtarget.py
@@ -121,7 +121,7 @@ class PackageBranchTarget(_BaseBranchTarget):
 
     def areBranchesMergeable(self, other_target):
         """See `IBranchTarget`."""
-        # Branches are mergable into a PackageTarget if the source package
+        # Branches are mergeable into a PackageTarget if the source package
         # name is the same, or the branch is associated with the linked
         # product.
         if zope_isinstance(other_target, PackageBranchTarget):
@@ -344,7 +344,7 @@ class ProductBranchTarget(_BaseBranchTarget):
 
     def areBranchesMergeable(self, other_target):
         """See `IBranchTarget`."""
-        # Branches are mergable into a PackageTarget if the source package
+        # Branches are mergeable into a PackageTarget if the source package
         # name is the same, or the branch is associated with the linked
         # product.
         if zope_isinstance(other_target, ProductBranchTarget):
diff --git a/lib/lp/code/model/revision.py b/lib/lp/code/model/revision.py
index 96b4320..10dcd28 100644
--- a/lib/lp/code/model/revision.py
+++ b/lib/lp/code/model/revision.py
@@ -742,7 +742,7 @@ class RevisionCache(StormBase):
         # Make the revision_author assignment first as traversing to the
         # revision_author of the revision does a query which causes a store
         # flush.  If an assignment has been done already, the RevisionCache
-        # object would have been implicitly added to the store, and failes
+        # object would have been implicitly added to the store, and fails
         # with an integrity check.
         self.revision_author = revision.revision_author
         self.revision = revision
diff --git a/lib/lp/code/model/tests/test_branch.py b/lib/lp/code/model/tests/test_branch.py
index 3899b9a..dfb0983 100644
--- a/lib/lp/code/model/tests/test_branch.py
+++ b/lib/lp/code/model/tests/test_branch.py
@@ -1722,7 +1722,7 @@ class TestBranchDeletionConsequences(TestCase):
         )
 
     def test_deleteMergeProposalDependent(self):
-        """break_links enables deleting merge proposal dependant branches."""
+        """break_links enables deleting merge proposal dependent branches."""
         merge_proposal1, merge_proposal2 = self.makeMergeProposals()
         merge_proposal1.prerequisite_branch.destroySelf(break_references=True)
         self.assertEqual(None, merge_proposal1.prerequisite_branch)
@@ -2262,7 +2262,7 @@ class TestLandingCandidates(TestCaseWithFactory):
 
 
 class BranchDateLastModified(TestCaseWithFactory):
-    """Exercies the situations where date_last_modifed is udpated."""
+    """Exercies the situations where date_last_modifed is updated."""
 
     layer = DatabaseFunctionalLayer
 
@@ -2319,7 +2319,7 @@ class BranchDateLastModified(TestCaseWithFactory):
 
     def test_updateScannedDetails_with_future_revision(self):
         # If updateScannedDetails is called with a revision with which has a
-        # revision date set in the future, UTC_NOW is used as the last modifed
+        # revision date set in the future, UTC_NOW is used as the last modified
         # time.  date_created = datetime(2000, 1, 1, 12, tzinfo=UTC)
         date_created = datetime(2000, 1, 1, 12, tzinfo=UTC)
         branch = self.factory.makeAnyBranch(date_created=date_created)
@@ -2352,7 +2352,7 @@ class TestBranchLifecycleStatus(TestCaseWithFactory):
             self.checkStatusAfterUpdate(state, state)
 
     def test_updateScannedDetails_inactive_branch(self):
-        # If a branch is inactive (merged or abandonded) and a new revision is
+        # If a branch is inactive (merged or abandoned) and a new revision is
         # scanned, the branch is moved to the development state.
         for state in (
             BranchLifecycleStatus.MERGED,
@@ -2597,16 +2597,16 @@ class TestCodebrowse(TestCaseWithFactory):
             branch.browse_source_url, branch.getCodebrowseUrl("files")
         )
 
-    def test_no_revisions_not_browseable(self):
-        # A branch with no revisions is not browseable.
+    def test_no_revisions_not_browsable(self):
+        # A branch with no revisions is not browsable.
         branch = self.factory.makeBranch()
-        self.assertFalse(branch.code_is_browseable)
+        self.assertFalse(branch.code_is_browsable)
 
-    def test_revisions_means_browseable(self):
-        # A branch that has revisions is browseable.
+    def test_revisions_means_browsable(self):
+        # A branch that has revisions is browsable.
         branch = self.factory.makeBranch()
         self.factory.makeRevisionsForBranch(branch, count=5)
-        self.assertTrue(branch.code_is_browseable)
+        self.assertTrue(branch.code_is_browsable)
 
 
 class TestBranchNamespace(TestCaseWithFactory):
diff --git a/lib/lp/code/model/tests/test_branchcollection.py b/lib/lp/code/model/tests/test_branchcollection.py
index e9843b5..a871cc5 100644
--- a/lib/lp/code/model/tests/test_branchcollection.py
+++ b/lib/lp/code/model/tests/test_branchcollection.py
@@ -82,7 +82,7 @@ class TestBranchCollectionAdaptation(TestCaseWithFactory):
         self.assertCollection(self.factory.makeSourcePackage())
 
     def test_distribution_source_package(self):
-        # A distribution source pakcage can be adapted to a branch collection.
+        # A distribution source package can be adapted to a branch collection.
         self.assertCollection(self.factory.makeDistributionSourcePackage())
 
 
@@ -832,7 +832,7 @@ class TestGenericBranchCollectionVisibleFilter(TestCaseWithFactory):
         )
 
     def test_private_teams_see_own_private_junk_branches(self):
-        # Private teams are given an acess grant to see their private +junk
+        # Private teams are given an access grant to see their private +junk
         # branches.
         team_owner = self.factory.makePerson()
         team = self.factory.makeTeam(
diff --git a/lib/lp/code/model/tests/test_branchlistingqueryoptimiser.py b/lib/lp/code/model/tests/test_branchlistingqueryoptimiser.py
index ad9208b..0336db3 100644
--- a/lib/lp/code/model/tests/test_branchlistingqueryoptimiser.py
+++ b/lib/lp/code/model/tests/test_branchlistingqueryoptimiser.py
@@ -78,7 +78,7 @@ class TestGetProductSeriesForBranches(TestCaseWithFactory):
         self.assertSeriesBranches([alpha, beta, gamma])
 
     def test_multiple_series_for_single_branch(self):
-        """A single branch can be assiciated with multiple series.
+        """A single branch can be associated with multiple series.
 
         Make sure that all the associated series get returned.
         """
diff --git a/lib/lp/code/model/tests/test_branchmergeproposal.py b/lib/lp/code/model/tests/test_branchmergeproposal.py
index 17d2f12..eaec3f0 100644
--- a/lib/lp/code/model/tests/test_branchmergeproposal.py
+++ b/lib/lp/code/model/tests/test_branchmergeproposal.py
@@ -627,7 +627,7 @@ class TestCreateCommentNotifications(TestCaseWithFactory):
         self.assertEqual(result, events[0].object)
 
     def test_notify_on_nominate_suppressed_if_requested(self):
-        # Ensure that the notification is supressed if the notify listeners
+        # Ensure that the notification is suppressed if the notify listeners
         # parameger is set to False.
         merge_proposal = self.factory.makeBranchMergeProposal()
         commenter = self.factory.makePerson()
diff --git a/lib/lp/code/model/tests/test_branchnamespace.py b/lib/lp/code/model/tests/test_branchnamespace.py
index 426450a..ab9ec1c 100644
--- a/lib/lp/code/model/tests/test_branchnamespace.py
+++ b/lib/lp/code/model/tests/test_branchnamespace.py
@@ -269,7 +269,7 @@ class NamespaceMixin:
     def test_validateMove_forbidden_owner(self):
         # If the mover isn't allowed to create branches in the namespace, then
         # they aren't allowed to move branches in there either, so
-        # validateMove wil raise a BranchCreatorNotOwner error.
+        # validateMove will raise a BranchCreatorNotOwner error.
         namespace = self.getNamespace()
         branch = self.factory.makeAnyBranch()
         mover = self.factory.makePerson()
@@ -1425,7 +1425,7 @@ class BaseValidateNewBranchMixin:
     layer = DatabaseFunctionalLayer
 
     def _getNamespace(self, owner):
-        # Return a namespace appropraite for the owner specified.
+        # Return a namespace appropriate for the owner specified.
         raise NotImplementedError(self._getNamespace)
 
     def test_registrant_not_owner(self):
diff --git a/lib/lp/code/model/tests/test_branchsubscription.py b/lib/lp/code/model/tests/test_branchsubscription.py
index 11b3b17..9950e4e 100644
--- a/lib/lp/code/model/tests/test_branchsubscription.py
+++ b/lib/lp/code/model/tests/test_branchsubscription.py
@@ -112,7 +112,7 @@ class TestBranchSubscriptions(TestCaseWithFactory):
             self.assertTrue(branch.visibleByUser(subscribee))
 
     def test_unsubscribe_removes_access(self):
-        """Unsubscibing a user to a branch removes their access."""
+        """Unsubscribing a user from a branch removes their access."""
         owner = self.factory.makePerson()
         branch = self.factory.makeBranch(
             information_type=InformationType.USERDATA, owner=owner
diff --git a/lib/lp/code/model/tests/test_branchtarget.py b/lib/lp/code/model/tests/test_branchtarget.py
index b73a527..4370f92 100644
--- a/lib/lp/code/model/tests/test_branchtarget.py
+++ b/lib/lp/code/model/tests/test_branchtarget.py
@@ -519,7 +519,7 @@ class TestCheckDefaultStackedOnBranch(TestCaseWithFactory):
 
     def test_unmirrored(self):
         # `check_default_stacked_on` returns None if passed an unmirrored
-        # banch. This is because we don't want to stack things on unmirrored
+        # branch. This is because we don't want to stack things on unmirrored
         # branches.
         branch = self.factory.makeAnyBranch()
         self.assertIs(None, check_default_stacked_on(branch))
diff --git a/lib/lp/code/model/tests/test_codeimport.py b/lib/lp/code/model/tests/test_codeimport.py
index fe10ffe..2541e9b 100644
--- a/lib/lp/code/model/tests/test_codeimport.py
+++ b/lib/lp/code/model/tests/test_codeimport.py
@@ -227,7 +227,7 @@ class TestCodeImportCreation(TestCodeImportBase):
             self.assertRaises(AssertionError, create_func)
 
     def test_junk_code_import_rejected(self):
-        """You are not allowed to create code imports targetting +junk."""
+        """You are not allowed to create code imports targeting +junk."""
         registrant = self.factory.makePerson()
         self.assertRaises(
             AssertionError,
@@ -242,7 +242,7 @@ class TestCodeImportCreation(TestCodeImportBase):
         )
 
     def test_create_source_package_import(self):
-        """Test that we can create an import targetting a source package."""
+        """Test that we can create an import targeting a source package."""
         registrant = self.factory.makePerson()
         source_package = self.factory.makeSourcePackage()
         if self.target_rcs_type == TargetRevisionControlSystems.BZR:
diff --git a/lib/lp/code/model/tests/test_gitnamespace.py b/lib/lp/code/model/tests/test_gitnamespace.py
index 97bd2a8..df4c5cc 100644
--- a/lib/lp/code/model/tests/test_gitnamespace.py
+++ b/lib/lp/code/model/tests/test_gitnamespace.py
@@ -290,7 +290,7 @@ class NamespaceMixin:
     def test_validateMove_forbidden_owner(self):
         # If the mover isn't allowed to create repositories in the
         # namespace, then they aren't allowed to move repositories in there
-        # either, so validateMove wil raise a GitRepositoryCreatorNotOwner
+        # either, so validateMove will raise a GitRepositoryCreatorNotOwner
         # error.
         namespace = self.getNamespace()
         repository = self.factory.makeGitRepository()
diff --git a/lib/lp/code/model/tests/test_revision.py b/lib/lp/code/model/tests/test_revision.py
index 3f489dd..150fa49 100644
--- a/lib/lp/code/model/tests/test_revision.py
+++ b/lib/lp/code/model/tests/test_revision.py
@@ -350,7 +350,7 @@ class TestRevisionGetBranch(TestCaseWithFactory):
         )
 
     def testGetBranchSourcePackage(self):
-        # Branches targetting source packages are not junk.
+        # Branches targeting source packages are not junk.
         b1 = self.factory.makePackageBranch()
         b1.createBranchRevision(1, self.revision)
         b2 = self.factory.makePersonalBranch(owner=self.author)
diff --git a/lib/lp/code/model/tests/test_revisioncache.py b/lib/lp/code/model/tests/test_revisioncache.py
index 5a7f3b9..aba5fce 100644
--- a/lib/lp/code/model/tests/test_revisioncache.py
+++ b/lib/lp/code/model/tests/test_revisioncache.py
@@ -58,7 +58,7 @@ class TestRevisionCacheAdaptation(TestCaseWithFactory):
         self.assertIsNot(None, cache)
 
     def test_distribution_source__package(self):
-        # A distribution source pakcage can be adapted to a revision cache.
+        # A distribution source package can be adapted to a revision cache.
         distro_source_package = self.factory.makeDistributionSourcePackage()
         cache = IRevisionCache(distro_source_package, None)
         self.assertIsNot(None, cache)
@@ -314,7 +314,7 @@ class TestRevisionCache(TestCaseWithFactory):
         return person, rev
 
     def test_authored_by_individual(self):
-        # Check that authoredBy appropriatly limits revisions to those
+        # Check that authoredBy appropriately limits revisions to those
         # authored by the individual specified.
         eric, rev1 = self.makePersonAndLinkedRevision()
         # Make a second revision by eric.
@@ -327,7 +327,7 @@ class TestRevisionCache(TestCaseWithFactory):
         self.assertCollectionContents([rev1, rev2], revision_cache)
 
     def test_authored_by_team(self):
-        # Check that authoredBy appropriatly limits revisions to those
+        # Check that authoredBy appropriately limits revisions to those
         # authored by individuals of a team.  Since we want to add members to
         # the team, and don't want security checks, we remove the security
         # proxy from the team.
diff --git a/lib/lp/code/stories/branches/xx-branch-edit.rst b/lib/lp/code/stories/branches/xx-branch-edit.rst
index aa807d7..e6a8443 100644
--- a/lib/lp/code/stories/branches/xx-branch-edit.rst
+++ b/lib/lp/code/stories/branches/xx-branch-edit.rst
@@ -64,8 +64,8 @@ taken into account. The trailing slash added to the URL has been
 ignored.
 
 Since the details have been changed, emails should have been sent out.
-Emails go out to the all the subscribers.  Now there are no subscribers
-so there whould be no emails.
+Emails go out to all the subscribers.  Now there are no subscribers
+so there should be no emails.
 
     >>> from zope.component import getUtility
     >>> from lp.code.interfaces.branchjob import IBranchModifiedMailJobSource
diff --git a/lib/lp/code/stories/branches/xx-person-portlet-teambranches.rst b/lib/lp/code/stories/branches/xx-person-portlet-teambranches.rst
index 686b0fa..a940a86 100644
--- a/lib/lp/code/stories/branches/xx-person-portlet-teambranches.rst
+++ b/lib/lp/code/stories/branches/xx-person-portlet-teambranches.rst
@@ -1,7 +1,7 @@
 Person Team Branches Portlet
 ============================
 
-The purpose of this portlet is to indiciate that there are teams
+The purpose of this portlet is to indicate that there are teams
 that this person participates in that has branches.
 
 The portlet only appears when the persons teams actually have branches,
diff --git a/lib/lp/code/stories/branches/xx-product-branches.rst b/lib/lp/code/stories/branches/xx-product-branches.rst
index 5eb30bf..7e99fe2 100644
--- a/lib/lp/code/stories/branches/xx-product-branches.rst
+++ b/lib/lp/code/stories/branches/xx-product-branches.rst
@@ -80,9 +80,9 @@ in downloads that may have been added for the product.
 Development focus branches
 ==========================
 
-If a development focus branch is set and browseable, the user is shown
+If a development focus branch is set and browsable, the user is shown
 a link to browse the code and a simple command line to get the branch.
-If the branch is not browseable (in this case, it has no revisions but
+If the branch is not browsable (in this case, it has no revisions but
 it could be private or remote), only the command to get the branch is
 shown.
 
diff --git a/lib/lp/code/stories/codeimport/xx-admin-codeimport.rst b/lib/lp/code/stories/codeimport/xx-admin-codeimport.rst
index 2378d67..77a516c 100644
--- a/lib/lp/code/stories/codeimport/xx-admin-codeimport.rst
+++ b/lib/lp/code/stories/codeimport/xx-admin-codeimport.rst
@@ -215,7 +215,7 @@ Git-to-Git imports,
     >>> print_feedback_messages(import_browser.contents)
     The code import has been updated.
 
-and imports targetting source packages.
+and imports targeting source packages.
 
     >>> import_browser.open(package_import_location + "/+edit-import")
     >>> import_browser.getControl(
diff --git a/lib/lp/code/templates/branch-macros.pt b/lib/lp/code/templates/branch-macros.pt
index 6eb8133..48b368d 100644
--- a/lib/lp/code/templates/branch-macros.pt
+++ b/lib/lp/code/templates/branch-macros.pt
@@ -243,9 +243,9 @@
     </tal:comment>
     <a tal:attributes="href python: branch.getCodebrowseUrlForRevision(rev_no.sequence)"
        tal:content="rev_no/sequence"
-       tal:condition="rev_no/branch/code_is_browseable">
+       tal:condition="rev_no/branch/code_is_browsable">
       1
-    </a><tal:revno condition="not: rev_no/branch/code_is_browseable"
+    </a><tal:revno condition="not: rev_no/branch/code_is_browsable"
                    replace="rev_no/sequence">1</tal:revno>.
     By
     <tal:revision-author define="revision_author rev_no/revision/revision_author">
diff --git a/lib/lp/code/templates/product-branch-summary.pt b/lib/lp/code/templates/product-branch-summary.pt
index 7c8a1d1..d0c707a 100644
--- a/lib/lp/code/templates/product-branch-summary.pt
+++ b/lib/lp/code/templates/product-branch-summary.pt
@@ -84,13 +84,13 @@
          tal:define="config modules/lp.services.config/config;
                      dev_focus context/development_focus/branch">
       You can
-      <tal:browseable condition="dev_focus/code_is_browseable">
+      <tal:browsable condition="dev_focus/code_is_browsable">
         <a tal:attributes="href dev_focus/browse_source_url"
            >browse the source code</a> for the development focus branch or get a
-           copy of the branch</tal:browseable>
-      <tal:not-browseable condition="not: dev_focus/code_is_browseable">
+           copy of the branch</tal:browsable>
+      <tal:not-browsable condition="not: dev_focus/code_is_browsable">
         get a copy of the development focus branch
-      </tal:not-browseable>
+      </tal:not-browsable>
        using the command:<br/>
       <tt class="command">bzr branch <tal:project-name replace="dev_focus/bzr_identity"/></tt>
     </div>
diff --git a/lib/lp/code/xmlrpc/tests/test_branch.py b/lib/lp/code/xmlrpc/tests/test_branch.py
index 5ede479..9afa744 100644
--- a/lib/lp/code/xmlrpc/tests/test_branch.py
+++ b/lib/lp/code/xmlrpc/tests/test_branch.py
@@ -28,10 +28,10 @@ class TestExpandURL(TestCaseWithFactory):
 
     layer = DatabaseFunctionalLayer
 
-    def makeProdutWithTrunk(self):
+    def makeProductWithTrunk(self):
         """Make a new project with a trunk hosted branch."""
         product = self.factory.makeProduct()
-        # BranchType is only signficiant insofar as it is not a REMOTE branch.
+        # BranchType is only significant insofar as it is not a REMOTE branch.
         trunk = self.factory.makeProductBranch(
             branch_type=BranchType.HOSTED, product=product
         )
@@ -90,7 +90,7 @@ class TestExpandURL(TestCaseWithFactory):
         # containing a list of these URLs, with the faster and more featureful
         # URLs earlier in the list. We use a dict so we can easily add more
         # information in the future.
-        product, trunk = self.makeProdutWithTrunk()
+        product, trunk = self.makeProductWithTrunk()
         api = PublicCodehostingAPI(None, None)
         results = api.resolve_lp_path(product.name)
         urls = [
@@ -102,7 +102,7 @@ class TestExpandURL(TestCaseWithFactory):
     def test_resultDictForHotProduct(self):
         # If 'project-name' is in the config.codehosting.hot_products list,
         # lp:project-name will only resolve to the http url.
-        product, trunk = self.makeProdutWithTrunk()
+        product, trunk = self.makeProductWithTrunk()
         self.pushConfig("codehosting", hot_products=product.name)
         api = PublicCodehostingAPI(None, None)
         results = api.resolve_lp_path(product.name)
@@ -113,7 +113,7 @@ class TestExpandURL(TestCaseWithFactory):
         # lp:product expands to the branch associated with development focus
         # of the product for the anonymous public access, just to the aliased
         # short name for bzr+ssh access.
-        product, trunk = self.makeProdutWithTrunk()
+        product, trunk = self.makeProductWithTrunk()
         lp_path = product.name
         self.assertResolves(lp_path, trunk.unique_name, lp_path)
 
@@ -121,7 +121,7 @@ class TestExpandURL(TestCaseWithFactory):
         # lp:product/development_focus expands to the branch associated with
         # development focus of the product for the anonymous public access,
         # just to the aliased short name for bzr+ssh access.
-        product, trunk = self.makeProdutWithTrunk()
+        product, trunk = self.makeProductWithTrunk()
         lp_path = "%s/%s" % (product.name, product.development_focus.name)
         self.assertResolves(lp_path, trunk.unique_name, lp_path)
 
@@ -169,7 +169,7 @@ class TestExpandURL(TestCaseWithFactory):
     def test_trunk_accessed_as_branch(self):
         # A branch that is the development focus for any product can also be
         # accessed through the branch's unique_name.
-        _ignored, trunk = self.makeProdutWithTrunk()
+        _ignored, trunk = self.makeProductWithTrunk()
         self.assertResolves(trunk.unique_name, trunk.unique_name)
 
     def test_mirrored_branch(self):
@@ -300,7 +300,7 @@ class TestExpandURL(TestCaseWithFactory):
     def test_trailing_slashes(self):
         # Trailing slashes are trimmed.
         # Trailing slashes on lp:product//
-        product, trunk = self.makeProdutWithTrunk()
+        product, trunk = self.makeProductWithTrunk()
         self.assertResolves(
             product.name + "/", trunk.unique_name, product.name
         )
@@ -341,7 +341,7 @@ class TestExpandURL(TestCaseWithFactory):
 
     def test_private_branch_as_development_focus(self):
         # We resolve private linked branches using the writable alias.
-        product, trunk = self.makeProdutWithTrunk()
+        product, trunk = self.makeProductWithTrunk()
         removeSecurityProxy(trunk).information_type = InformationType.USERDATA
         self.assertOnlyWritableResolves(product.name)