Kaynağa Gözat

Fix flake8 formatting compatibility.

Jelmer Vernooij 2 yıl önce
ebeveyn
işleme
9ac44ced5b

+ 1 - 1
.flake8

@@ -1,5 +1,5 @@
 [flake8]
-extend-ignore = E203, E266, E501, W293, W291
+extend-ignore = E203, E266, E501, W293, W291, W503
 max-line-length = 88
 max-complexity = 18
 select = B,C,E,F,W,T4,B9

+ 1 - 1
.github/workflows/pythonpackage.yml

@@ -38,7 +38,7 @@ jobs:
     - name: Install dependencies
       run: |
         python -m pip install --upgrade pip
-        pip install -U pip coverage flake8==4.0.1 fastimport paramiko urllib3
+        pip install -U pip coverage flake8 fastimport paramiko urllib3
     - name: Install gpg on supported platforms
       run: pip install -U gpg
       if: "matrix.os != 'windows-latest' && matrix.python-version != 'pypy3'"

+ 5 - 5
dulwich/repo.py

@@ -1065,11 +1065,11 @@ class Repo(BaseRepo):
     ) -> None:
         hidden_path = os.path.join(root, CONTROLDIR)
         if bare is None:
-            if (os.path.isfile(hidden_path) or
-                    os.path.isdir(os.path.join(hidden_path, OBJECTDIR))):
+            if (os.path.isfile(hidden_path)
+                    or os.path.isdir(os.path.join(hidden_path, OBJECTDIR))):
                 bare = False
-            elif (os.path.isdir(os.path.join(root, OBJECTDIR)) and
-                    os.path.isdir(os.path.join(root, REFSDIR))):
+            elif (os.path.isdir(os.path.join(root, OBJECTDIR))
+                    and os.path.isdir(os.path.join(root, REFSDIR))):
                 bare = True
             else:
                 raise NotGitRepository(
@@ -1356,7 +1356,7 @@ class Repo(BaseRepo):
         from dulwich.index import (
             IndexEntry,
             _fs_to_tree_path,
-            )
+        )
 
         index = self.open_index()
         try:

+ 1 - 1
dulwich/tests/compat/test_porcelain.py

@@ -94,7 +94,7 @@ class TagCreateSignTestCase(PorcelainGpgTestCase, CompatTestCase):
                 'GNUPGHOME': os.environ['GNUPGHOME'],
                 'GIT_COMMITTER_NAME': 'Joe Example',
                 'GIT_COMMITTER_EMAIL': 'joe@example.com',
-                },
+            },
         )
         tag = self.repo[b"refs/tags/verifyme"]
         self.assertNotEqual(tag.signature, None)