diff --git a/djblets/extensions/packaging.py b/djblets/extensions/packaging.py
index 6813f161e9bb286d5a889b9c972d9ba18da293e0..3807ff67f0c15d53ae673f1fa61654bb4f1db5bd 100644
--- a/djblets/extensions/packaging.py
+++ b/djblets/extensions/packaging.py
@@ -224,8 +224,6 @@ class BuildStaticFiles(Command):
         """Removes all source files, leaving only built bundles."""
         for root, dirs, files in os.walk(media_build_dir, topdown=False):
             for name in files:
-                full_path = os.path.join(root, name)
-
                 # A valid file will be represented as one of:
                 #
                 #     (bundle_name, 'min', stamp, ext)
diff --git a/djblets/extensions/tests.py b/djblets/extensions/tests.py
index a33a91c660235062fcec651506b70dd7b4000fce..8d8b20a8ab0709cfca206fdf976436525bab8753 100644
--- a/djblets/extensions/tests.py
+++ b/djblets/extensions/tests.py
@@ -883,7 +883,7 @@ class TemplateHookTest(TestCase):
 
                 return ''
 
-        hook = MyTemplateHook(self.extension, 'test')
+        MyTemplateHook(self.extension, 'test')
         context = Context({})
         context['request'] = None
 
@@ -900,7 +900,7 @@ class TemplateHookTest(TestCase):
             def render_to_string(self, request, context):
                 raise Exception('Oh noes')
 
-        hook = MyTemplateHook(self.extension, 'test')
+        MyTemplateHook(self.extension, 'test')
         context = Context({})
         context['request'] = None
 
