[Pkg-privacy-commits] [mat] 07/68: Add more type hint

Sascha Steinbiss sascha at steinbiss.name
Sun Jan 3 12:32:37 UTC 2016


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

sascha-guest pushed a commit to branch master
in repository mat.

commit ba615c268f14bd2519dc61746cfa151ce730ec76
Author: jvoisin <julien.voisin at dustri.org>
Date:   Tue Nov 3 15:53:42 2015 +0100

    Add more type hint
---
 libmat/archive.py |  2 ++
 mat               | 20 +++++++++++++++++---
 2 files changed, 19 insertions(+), 3 deletions(-)

diff --git a/libmat/archive.py b/libmat/archive.py
index 426dcf9..703ee66 100644
--- a/libmat/archive.py
+++ b/libmat/archive.py
@@ -81,6 +81,8 @@ class ZipStripper(GenericArchiveStripper):
             When list_unsupported is True, the method returns a list
             of all non-supported/archives files contained in the
             archive.
+
+            :param bool list_unsupported: Should the list of unsupported files be returned
         """
         ret_list = []
         zipin = zipfile.ZipFile(self.filename, 'r')
diff --git a/mat b/mat
index f66db41..406d41b 100755
--- a/mat
+++ b/mat
@@ -41,7 +41,11 @@ def parse():
 
 
 def list_meta(class_file, filename, add2archive):
-    """ Print all the metadata of 'filename' on stdout
+    """ Print all the metadata of $filename on stdout
+
+    :param parser.GenericParser class_file: The class file representing $filename
+    :param str filename: File to parse
+    :param bool add2archive: Unused parameter, check the `main` function for more information
     """
     print('[+] File %s :' % filename)
     if class_file.is_clean():
@@ -56,7 +60,12 @@ def list_meta(class_file, filename, add2archive):
 
 
 def is_clean(class_file, filename, add2archive):
-    """ Tell if 'filename' is clean or not """
+    """ Tell if 'filename' is clean or not
+
+    :param parser.GenericParser class_file: The class file representing $filename
+    :param str filename: File to parse
+    :param bool add2archive: Unused parameter, check the `main` function for more information
+    """
     if class_file.is_clean():
         print('[+] %s is clean' % filename)
     else:
@@ -65,7 +74,12 @@ def is_clean(class_file, filename, add2archive):
 
 
 def clean_meta(class_file, filename, add2archive):
-    """ Clean the file 'filename' """
+    """ Clean the file 'filename'
+
+    :param parser.GenericParser class_file: The class file representing $filename
+    :param str filename: File to parse
+    :param bool add2archive: Unused parameter, check the `main` function for more information
+    """
     if not class_file.is_writable:
         print('[-] %s is not writable' % filename)
         return 1

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/mat.git



More information about the Pkg-privacy-commits mailing list