소스 검색

Fix some pyflakes warnings.

Jelmer Vernooij 8 년 전
부모
커밋
ca6edf70fb

+ 0 - 8
dulwich/config.py

@@ -219,14 +219,6 @@ def _parse_string(value):
     return bytes(ret)
 
 
-def _unescape_value(value):
-    """Unescape a value."""
-    ret = bytearray()
-    i = 0
-
-    return ret
-
-
 def _escape_value(value):
     """Escape a value."""
     return value.replace(b"\\", b"\\\\").replace(b"\n", b"\\n").replace(b"\t", b"\\t").replace(b"\"", b"\\\"")

+ 0 - 1
dulwich/contrib/paramiko_vendor.py

@@ -30,7 +30,6 @@ This implementation is experimental and does not have any tests.
 
 import paramiko
 import paramiko.client
-import subprocess
 import threading
 
 class _ParamikoWrapper(object):

+ 0 - 1
dulwich/server.py

@@ -473,7 +473,6 @@ def _all_wants_satisfied(store, haves, wants):
         earliest = min([store[h].commit_time for h in haves])
     else:
         earliest = 0
-    unsatisfied_wants = set()
     for want in wants:
         if not _want_satisfied(store, haves, want, earliest):
             return False

+ 0 - 1
dulwich/tests/compat/test_pack.py

@@ -134,7 +134,6 @@ class TestPack(PackTests):
         # two copy operations in git's binary delta format.
         raise SkipTest('skipping slow, large test')
         with self.get_pack(pack1_sha) as orig_pack:
-            orig_blob = orig_pack[a_sha]
             new_blob = Blob()
             new_blob.data = 'big blob' + ('x' * 2 ** 25)
             new_blob_2 = Blob()

+ 0 - 1
dulwich/tests/test_config.py

@@ -28,7 +28,6 @@ from dulwich.config import (
     _format_string,
     _escape_value,
     _parse_string,
-    _unescape_value,
     parse_submodules,
     )
 from dulwich.tests import (

+ 0 - 1
dulwich/tests/test_hooks.py

@@ -20,7 +20,6 @@
 import os
 import stat
 import shutil
-import sys
 import tempfile
 
 from dulwich import errors

+ 4 - 5
dulwich/tests/test_porcelain.py

@@ -523,11 +523,10 @@ class PushTests(PorcelainTestCase):
         porcelain.push(clone_path, self.repo.path, b":" + refs_path, outstream=outstream,
             errstream=errstream)
 
-        with closing(Repo(clone_path)) as r_clone:
-            self.assertEqual({
-                b'HEAD': new_id,
-                b'refs/heads/master': new_id,
-                }, self.repo.get_refs())
+        self.assertEqual({
+            b'HEAD': new_id,
+            b'refs/heads/master': new_id,
+            }, self.repo.get_refs())
 
 
 

+ 0 - 1
dulwich/tests/utils.py

@@ -23,7 +23,6 @@
 import datetime
 import os
 import shutil
-import sys
 import tempfile
 import time
 import types