Переглянути джерело

filetime_from_git: Style cleanup

Fix some long lines and other minor style issues.
Chris Scutcher 6 роки тому
батько
коміт
ffc01ecfa6
2 змінених файлів з 12 додано та 7 видалено
  1. 7 4
      filetime_from_git/actions.py
  2. 5 3
      filetime_from_git/git_wrapper.py

+ 7 - 4
filetime_from_git/actions.py

@@ -1,12 +1,14 @@
 # -*- coding: utf-8 -*-
 import base64
 import hashlib
-import os
 import logging
+import os
+
 from pelican.utils import strftime
-from .utils import string_to_bool
-from .utils import datetime_from_timestamp
+
 from .registration import content_git_object_init
+from .utils import datetime_from_timestamp
+from .utils import string_to_bool
 
 
 logger = logging.getLogger(__name__)
@@ -112,6 +114,7 @@ def git_permalink(content, git_content):
     if permalink_id_metadata_key in content.metadata:
         content.metadata[permalink_id_metadata_key] = (
             ','.join((
-                content.metadata[permalink_id_metadata_key], git_permalink_id)))
+                content.metadata[permalink_id_metadata_key], git_permalink_id))
+        )
     else:
         content.metadata[permalink_id_metadata_key] = git_permalink_id

+ 5 - 3
filetime_from_git/git_wrapper.py

@@ -128,10 +128,12 @@ class _GitWrapper(_GitWrapperCommon):
         :returns: Sequence of commit objects. Newest to oldest
 
         .. NOTE ::
-            If this fails it could be that your gitpython version is out of sync with the git
-            binary on your distro. Make sure you use the correct gitpython version.
+            If this fails it could be that your gitpython version is out of
+            sync with the git binary on your distro.
+            Make sure you use the correct gitpython version.
 
-            Alternatively enabling GIT_FILETIME_FOLLOW may also make your problem go away.
+            Alternatively enabling GIT_FILETIME_FOLLOW may also make your
+            problem go away.
         '''
         return list(self.repo.iter_commits(paths=path))