[diffoscope] 01/01: Move the documentation for maybe_decode into a docstring on the method itself.

Chris Lamb chris at chris-lamb.co.uk
Fri Mar 9 05:49:20 CET 2018


This is an automated email from the git hooks/post-receive script.

lamby pushed a commit to branch master
in repository diffoscope.

commit dd767cc66c86434c805652b0b8189c17e2c5dd39
Author: Chris Lamb <lamby at debian.org>
Date:   Thu Mar 8 20:48:55 2018 -0800

    Move the documentation for maybe_decode into a docstring on the method itself.
---
 diffoscope/comparators/utils/file.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/diffoscope/comparators/utils/file.py b/diffoscope/comparators/utils/file.py
index 6846d21..4fd49ac 100644
--- a/diffoscope/comparators/utils/file.py
+++ b/diffoscope/comparators/utils/file.py
@@ -404,10 +404,12 @@ class File(object, metaclass=abc.ABCMeta):
             return difference
         return self.compare_bytes(other, source)
 
-# helper function to convert to bytes if necessary
-
 
 def maybe_decode(s):
+    """
+    Helper function to convert to bytes if necessary.
+    """
+
     if type(s) is bytes:
         return s.decode('utf-8')
     return s

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git


More information about the diffoscope mailing list