From ba615c268f14bd2519dc61746cfa151ce730ec76 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Tue, 3 Nov 2015 15:53:42 +0100 Subject: 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 -- cgit v1.3